Hibernate / Connection pooling issues
843833Apr 5 2005 — edited Apr 10 2005I have deployed an application on the 2005 Q1 version of the application server (8.1_01 (build b04-fcs)).
I am using Hibernate for persitence with a MySQL connection pool configured as the underlying database. When I deploy the app I am referencing the pool using the JNDI name with "__pm" appended (i.e. jdbc/mydb_pm). The connection pool is a javax.sql.ConnectionPoolDataSource with com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource as the implementation.
After about 8 hours of inactivity, I get an exception when hibernate tries to getConnection(). After some reading I decided to experiment with the Connection Validation in the appserver as well as the MySQL "autoReconnect" and "autoReconnectForPools" properties (together and seperately).
When I use either autoReconnect or Connection Validation (in any way) I get a java.sql.SQLException saying "No PasswordCredential found".
Also, I am using try/catch/finally to ensure that the Hibernate session is appropriately closed after every CRUD method invocation.
Any ideas?
John