Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Hibernate / Connection pooling issues

843833Apr 5 2005 — edited Apr 10 2005
I 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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 8 2005
Added on Apr 5 2005
1 comment
349 views