<! - Jdbc ->
<property name="connection.driver_class"> oracle.jdbc.driver.OracleDriver </ property>
<property name="connection.url"> jdbc: oracle: thin: @ 10.203.14.132:1521: remotedb </ property>
<property name="dialect"> org.hibernate.dialect.Oracle9Dialect </ property>
<property name="myeclipse.connection.profile"> oracledriver </ property>
<property name="connection.username"> imagedb </ property>
<property name="connection.password"> cpic </ property>
<! - C3P0 ->
<property name="connection.driver_class"> oracle.jdbc.driver.OracleDriver </ property>
<property name="connection.url"> jdbc: oracle: thin: @ 10.203.14.132:1521: remotedb </ property>
<property name="dialect"> org.hibernate.dialect.Oracle9Dialect </ property>
<property name="myeclipse.connection.profile"> oracledriver </ property>
<property name="connection.username"> imagedb </ property>
<property name="connection.password"> cpic </ property>
<property name="hibernate.connection.provider_class">
org.hibernate.connection.C3P0ConnectionProvider </ property>
<property name="hibernate.c3p0.max_size"> 20 </ property>
<property name="hibernate.c3p0.min_size"> 5 </ property>
<property name="hibernate.c3p0.timeout"> 120 </ property>
<property name="hibernate.c3p0.max_statements"> 100 </ property>
<property name="hibernate.c3p0.idle_test_period"> 120 </ property>
<property name="hibernate.c3p0.acquire_increment"> 20 </ property>
<! - Proxool ->
<! - The name to the above XML document and an alias to the corresponding ah ->
<property name="connection.provider_class">
org.hibernate.connection.ProxoolConnectionProvider </ property>
<property name="proxool.pool_alias"> imagePool </ property>
<! - This you have just set up above the name of the XML document ->
<property name="proxool.xml"> ProxoolConf.xml </ property>
<property name="connection.driver_class"> oracle.jdbc.driver.OracleDriver </ property>
ProxoolConf.xml
<? xml version = "1.0" encoding = "utf-8"?>
<! - The proxool configuration can be embedded within your own application's.
Anything outside the "proxool" tag is ignored. ->
<something-else-entirely>
<proxool>
<! - Connection pool Writing can be an alias, but noted that the back part to correspond in hibernate ->
<alias> imagePool </ alias>
<! - proxool can only be managed by the connection itself ->
<driver-url> jdbc: oracle: thin: @ 10.203.14.132:1521: remotedb </ driver-url>
<driver-class> oracle.jdbc.driver.OracleDriver </ driver-class>
<driver-properties>
<property name="user" value="imagedb"/>
<property name="password" value="cpic"/>
</ driver-properties>
<! - Proxool automatically detect the connection status of each time interval (milliseconds), detected idle connections as soon as recovery, the destruction of overtime ->
<house-keeping-sleep-time> 90000 </ house-keeping-sleep-time>
<! - Means no idle connection can be allocated in the queue waiting for the greatest number of requests, more than the requested number of users connected will not be accepted ->
<maximum-new-connections> 20 </ maximum-new-connections>
<! - At least to keep the idle connections ->
<prototype-count> 5 </ prototype-count>
<! - Permit the largest number of connections over the connection, and then have a request, on the row in the queue waiting, waiting for the biggest number of requests by the maximum-new-connections decided ->
<maximum-connection-count> 100 </ maximum-connection-count>
<! - The smallest number of connections ->
<minimum-connection-count> 10 </ minimum-connection-count>
<! - Wait for the largest number of requests, that is because there is no idle connection can be allocated in the queue waiting for the greatest number of requests, more than the requested number of user connections will not be accepted ->
<proxool.simultaneous-build-throttle> 200 </ proxool.simultaneous-build-throttle>
<! - Test SQL (SELECT getDate ()) ->
<house-keeping-test-sql> select CURRENT_DATE </ house-keeping-test-sql>
</ proxool>
</ something-else-entirely>
This is proxool-0.8.3 version turn off when the abnormal
18:08:54703 INFO imagePool: 474 - Shutting down 'imagePool' pool immediately [Shutdown Hook]
18:08:54750 ERROR ShutdownHook: 62 - Problem calling "get cause" on IllegalStateException.
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (Unknown Source)
at java.lang.reflect.Method.invoke (Unknown Source)
at org.logicalcobwebs.proxool.ShutdownHook.remove (ShutdownHook.java: 40)
at org.logicalcobwebs.proxool.ProxoolFacade.shutdown (ProxoolFacade.java: 238)
at org.logicalcobwebs.proxool.ProxoolFacade.shutdown (ProxoolFacade.java: 220)
at org.logicalcobwebs.proxool.ShutdownHook.run (ShutdownHook.java: 99)
at java.lang.Thread.run (Unknown Source)
Caused by: java.lang.IllegalStateException: Shutdown in progress
at java.lang.Shutdown.remove (Unknown Source)
at java.lang.Runtime.removeShutdownHook (Unknown Source)
... 9 more
Proposed proxool-0.9.1.jar
Official Address: http://proxool.sourceforge.net/changelog.html








Responses to “Hibernate connection pool configuration”