Catch StaleConnectionException

WebSphere groups a subset of SQLExceptions that may indicate invalid connections into a new exception, StaleConnectionException. We can catch StaleConnectionException and code a retry block in clients.

Clients can be servlets, EJBs, Java programs, etc. In the servlets, an auto commit, local transaction, or global transaction is usually used. In Java clients, an auto commit or local transaction is usually used. In the EJBs, a global transaction is usually used. We can distinguish direct JDBC calls and indirect JDBC calls. For indirect JDBC calls, we also can distinguish rethrowable, new retryable exceptions, or those that are wrapped in another exception.

  Prev | Home | Next

 

WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.

 

IBM is a trademark of the IBM Corporation in the United States, other countries, or both.