Friday 21 December 2012

Stale connections

There are different scenarios which this exception will occurs.Those are StaleConnectionException: This exception (com.ibm.websphere.ce.cm.StaleConnectionException) indicates that the connection currently being held is no longer valid. This can occur for numerous reasons, including the following:

 1 The application tries to get a connection and fails, as when the database is not started.

 2 A connection is no longer usable due to a database failure. When an application tries to use a connection it has previously obtained, the connection is no longer valid. In this case, all connections currently in use by an application could get this error when they try to use the connection. 

3 The application using the connection has already called close() and then tries to use the connection again.

 4 The connection has been orphaned because the application had not used it in at most two times the orphan timeout; then the application tries to use the orphaned connection.

 5 The application tries to use a JDBC resource, such as a statement, obtained on a now-stale connection

No comments:

Post a Comment