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

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 微信会员卡等级和折扣规则
  • ¥15 微信公众平台自制会员卡可以通过收款码收款码收款进行自动积分吗
  • ¥15 随身WiFi网络灯亮但是没有网络,如何解决?
  • ¥15 gdf格式的脑电数据如何处理matlab
  • ¥20 重新写的代码替换了之后运行hbuliderx就这样了
  • ¥100 监控抖音用户作品更新可以微信公众号提醒
  • ¥15 UE5 如何可以不渲染HDRIBackdrop背景
  • ¥70 2048小游戏毕设项目
  • ¥20 mysql架构,按照姓名分表
  • ¥15 MATLAB实现区间[a,b]上的Gauss-Legendre积分