laianfa 2008-11-08 18:14
浏览 652
已采纳

hibernate配置中timeout与idle_test_period有什么区别

在用hibernate属性文件配置C3P0连接池的时候,hibernate.c3p0.timeout与hibernate.c3p0.idle_test_period这两个属性各是什么意思,有何区别?
Hiberante实战 这本书里是这样写的:
hibernate.c3p0.timeout:You specify the timeout period after which an idle connection is removed from the pool.
hibernate.c3p0.idle_test_period: This is the idle time in seconds before a connection is automatically validated.

  • 写回答

3条回答 默认 最新

  • iteye_521 2008-11-08 18:29
    关注

    区别:hibernate.c3p0.timeout表示连接对象多长时间[color=red]应该[/color]被销毁,
    注意,是”应该“,但是谁来销毁它呢,需要一个线程按照hibernate.c3p0.idle_test_period设定的时间间隔去自动校验这些链接对象并销毁timeout的

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 ads仿真结果在圆图上是怎么读数的
  • ¥20 Cotex M3的调试和程序执行方式是什么样的?
  • ¥20 java项目连接sqlserver时报ssl相关错误
  • ¥15 一道python难题3
  • ¥15 用matlab 设计一个不动点迭代法求解非线性方程组的代码
  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机
  • ¥20 程序进入HardFault_Handler
  • ¥15 oracle集群安装出bug
  • ¥15 关于#python#的问题:自动化测试