You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Cornelius Keller <ck...@informatik.hu-berlin.de> on 2003/05/06 14:45:38 UTC

Connection Timed Out | Persistence Broker best praktices

Hello List,

I have read the thread Persictence Broker best praktices, but I still 
have a question concerning connection pooling.

In my application, there is a persistence broker for every user session. 
  That means the broker is borowed from the pool if the user logs in and 
closed (returned to the pool) if the user loges out.

The follwoing problem occures:
After a certain time the mysql server seems to close the connection.

That leads to the follwowing exception:

org.apache.ojb.broker.metadata.ClassNotPersistenceCapableException: 
Could not init Identity for given object class 
com.ckeller.flweb.db.Version: Set autoCommit(false) failed: 
Communication link failure: java.net.SocketException

Stack trace
java.lang.RuntimeException: 
org.apache.ojb.broker.metadata.ClassNotPersistenceCapableException: 
Could not init Identity for given object class 
com.ckeller.flweb.db.Version: Set autoCommit(false) failed: 
Communication link failure: java.net.SocketException

[........]


The question is now, how I can avoid this.
Is there a possibility to limit the time a Databaseconnection is pooled, 
for example to 8 houres?

Or is there a possibility to catch this problem with the validation 
query settings?

Thanks in advance
- Cornelius