繁体   English   中英

C3p0属性在Spring / Hibernate应用程序中起作用吗?

[英]C3p0 properties effect in spring/hibernate application?

我将为连接池配置c3Po配置。 以下属性是什么意思?

preferredTestQuery  : query to test the connection
testConnectionOnCheckin : above query is executed when connection is returned back to pool
testConnectionOnCheckout : above query is executed when connection is taken from pool
idleConnectionTestPeriod :

我的理解正确吗?

谢谢!

这些设置控制C3P0如何测试超时连接。 我通常使用“ SELECT 1;” 例如,用于测试MySQL连接。 还有其他测试连接的方法,其中一些选择会影响性能,因此,我建议阅读此处提供的文档: http : //www.mchange.com/projects/c3p0/index.html#configuring_connection_testing

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM