【发布时间】:2014-04-26 02:46:52
【问题描述】:
由于我们向应用程序添加了 C3P0 连接池,因此性能变得更慢。它是 Oracle 10g 数据库、Hibernate 3.1.3 和 C3P0 0.9.0.4。 WebSphere 应用程序服务器。我对这件事很陌生,所以我不明白一切。这种配置是否会降低应用程序的性能?如果是我应该改变什么?
<property name="hibernate.connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property>
<property name="hibernate.c3p0.min_size">1</property>
<property name="hibernate.c3p0.max_size">50</property>
<property name="hibernate.c3p0.timeout">5000</property>
<property name="hibernate.c3p0.max_statements">50</property>
<property name="hibernate.c3p0.idle_test_period">600</property>
<property name="hibernate.c3p0.preferredTestQuery">select 1 from dual;</property>
【问题讨论】:
-
您看到日志了吗?池需要更多时间才能返回任何连接
标签: java hibernate oracle10g c3p0