As you mentionned, since Hibernate 2.1.4, the Proxool configuration has changed... It is now a bit less convenient to use and configure Proxool with Hibernate but still possible. We, at the proxool dev team are aware of this situation and are working hard to provide better integration with Hibernate.
In the meantime, here is how you can get it working:
- in the
hibernate.properties:
Code:
# the pool alias used to identify the pool
# note: hibernate will prefix this alias with 'hibernate-' - so your actual pool name becomes 'hibernate-myalias'
#
hibernate.proxool.pool_alias myalias
# Only need one of the following:
#
# -if the pool is configured from outside of hibernate
#hibernate.proxool.existing_pool true
# - if hibernate must configure the pool from an XML configuration file
#hibernate.proxool.xml proxool.xml
# - if hibernate must configure the pool from a properties file
#hibernate.proxool.properties proxool.properties
The XML or properties file containing the proxool configuration can be specified using a standard URL. If an invalid url is used (say the protocol part is missing) then the file will be looked-up as a resource on the classpath. The later is probably the most convenient...
For more information about what should be in the proxool configuration, please refer to
http://proxool.sourceforge.net/configure.htmlBelow is a minimal
proxool.properties for an Oracle database:
Code:
# the pool alias (name comes from the hibernate.properties)
# (don't forget Hibernate adds the 'hibernate-' prefix to your pool alias)
#
jdbc-0.proxool.alias=hibernate-myname
jdbc-0.proxool.driver-class oracle.jdbc.driver.OracleDriver
jdbc-0.proxool.driver-url jdbc:oracle:thin:@<host>:1521:<sid>
jdbc-0.user <login>
jdbc-0.password <password>
jdbc-0.proxool.house-keeping-sleep-time 30000
jdbc-0.proxool.house-keeping-test-sql select 1 from dual
jdbc-0.proxool.test-before-use true
jdbc-0.proxool.test-after-user false
Hope this helps.
A wiki page on how to configure Proxool with Hibernate will be soon available ;)