【发布时间】:2015-02-14 18:38:52
【问题描述】:
我正在使用 Hibernate,并且我在其配置中配置了一些 c3p0 属性,如 hibernate documentation 之一中指定的那样。示例配置如下:
<property name="hibernate.c3p0.min_size">5</property>
<property name="hibernate.c3p0.max_size">20</property>
<property name="hibernate.c3p0.timeout">300</property>
<property name="hibernate.c3p0.max_statements">50</property>
<property name="hibernate.c3p0.idle_test_period">3000</property>
我开始知道 c3p0 有许多其他属性可以通过配置文件 c3p0.properties 设置,但不能通过 c3p0 Documentation 中的 initialPoolSize、maxStatementsPerConnection、acquireAttempts 等休眠配置进行设置。
我的问题是如何验证我在 c3p0.properties 中设置的属性是否实际被使用?一种解决方案是将日志启用到调试级别。有没有其他解决方案可以确认这一点?喜欢可能是通过某些类以编程方式。
【问题讨论】:
标签: java hibernate configuration connection-pooling c3p0