Dear All,
I know using c3p0 to solve the problem that server will inactive after 8 hours. However, When I using c3po I have new issue that it's create too many connection without using. This is my mysql5.hibernate.cfg.xml file
<hibernate-configuration><session-factory>
<!--
hibernate c3p0 settings
-->
<property name="connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property>
<property name="hibernate.c3p0.acquire_increment">3</property>
<property name="hibernate.c3p0.idle_test_period">10</property>
<property name="hibernate.c3p0.min_size">5</property>
<property name="hibernate.c3p0.max_size">75</property>
<property name="hibernate.c3p0.max_statements">0</property>
<property name="hibernate.c3p0.timeout">25200</property>
<property name="hibernate.c3p0.preferredTestQuery">select 1</property>
<property name="hibernate.c3p0.testConnectionOnCheckout">true</property>
<!--
hibernate cache settings
-->
<property name="cache.provider_class">org.hibernate.cache.EhCacheProvider</property>
<property name="hibernate.generate_statistics">true</property>
<property name="hibernate.cache.use_query_cache">true</property>
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="connection.url">jdbc:mysql://localhost:3306/hibernate</property>
<property name="dialect">org.hibernate.dialect.MySQL5InnoDBDialect</property>
<property name="connection.username">root</property>
<property name="connection.password">password</property>
<property name="connection.pool_size">10</property>
<property name="show_sql">false</property>
<property name="hibernate.jdbc.use_streams_for_binary">true</property>
<property name="hibernate.hbm2ddl.auto">update</property>
<mapping resource="hibernate/mysql5innodb.hbm.xml"/>
<mapping resource="PentahoUser.hbm.xml"/>
<mapping resource="PentahoRole.hbm.xml"/>
<mapping resource="PentahoUserRoleMapping.hbm.xml"/>
</session-factory>
</hibernate-configuration>
How can I fix for setting ?
I know using c3p0 to solve the problem that server will inactive after 8 hours. However, When I using c3po I have new issue that it's create too many connection without using. This is my mysql5.hibernate.cfg.xml file
<hibernate-configuration><session-factory>
<!--
hibernate c3p0 settings
-->
<property name="connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property>
<property name="hibernate.c3p0.acquire_increment">3</property>
<property name="hibernate.c3p0.idle_test_period">10</property>
<property name="hibernate.c3p0.min_size">5</property>
<property name="hibernate.c3p0.max_size">75</property>
<property name="hibernate.c3p0.max_statements">0</property>
<property name="hibernate.c3p0.timeout">25200</property>
<property name="hibernate.c3p0.preferredTestQuery">select 1</property>
<property name="hibernate.c3p0.testConnectionOnCheckout">true</property>
<!--
hibernate cache settings
-->
<property name="cache.provider_class">org.hibernate.cache.EhCacheProvider</property>
<property name="hibernate.generate_statistics">true</property>
<property name="hibernate.cache.use_query_cache">true</property>
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="connection.url">jdbc:mysql://localhost:3306/hibernate</property>
<property name="dialect">org.hibernate.dialect.MySQL5InnoDBDialect</property>
<property name="connection.username">root</property>
<property name="connection.password">password</property>
<property name="connection.pool_size">10</property>
<property name="show_sql">false</property>
<property name="hibernate.jdbc.use_streams_for_binary">true</property>
<property name="hibernate.hbm2ddl.auto">update</property>
<mapping resource="hibernate/mysql5innodb.hbm.xml"/>
<mapping resource="PentahoUser.hbm.xml"/>
<mapping resource="PentahoRole.hbm.xml"/>
<mapping resource="PentahoUserRoleMapping.hbm.xml"/>
</session-factory>
</hibernate-configuration>
How can I fix for setting ?