IBM


Handling StaleConnectionException

This appendix provides details and code samples for handling the StaleConnectionException thrown by WebSphere. Generally, when a StaleConnectionException is caught, the transaction in which the connection was involved needs to be rolled back and a new transaction begun with a new connection. Details on how to do this can be broken down into three categories: - A connection in auto-commit mode.

- A connection not in auto-commit and transaction begun in the same method as database access.

- A connection not in auto-commit and transaction begun in a different method from database access.


Redbooks ibm.com/redbooks