IBM Support What's New?

Stale connection causes ConnectionClosed exception during inbound ordered delivery for WebSphere Adapter for JDBC

Technote (troubleshooting)


Connection is closed by WebSphere Application Server due to an XAException from the database.


An XAException is thrown:
Connection handle :
Managed connection : WSRdbManagedConnectionImpl@d920d92

[4/8/13 4:51:13:118 PST] 0000007a WSRdbXaResour E DSRA0304E: XAException
occurred. XAException contents and details are:
The XA Error is : -7
The XA Error message is : Resource manager is unavailable.
The Oracle Error code is : 17002
The Oracle Error message is: Internal XA Error
The cause is : null.
[4/8/13 4:51:13:118 PST] 0000005a WSRdbXaResour 3 fire normal connection
error occurred event for XAResource
[4/8/13 4:51:13:118 PST] 0000005a WSJdbcConnect > close Entry
[4/8/13 4:51:13:118 PST] 0000005a WSRdbManagedC 1 Firing
CONNECTION_ERROR_OCCURRED event for handle: null

During the prepareStatement() call from JDBC adapter, the oracle jdbc driver throws a XA
Error and the reason is the "Resource manager is unavailable.". Upon
the XA exception, WebSphere RRA component treats it as a fatal connection
error, marks the connection as stale and based on the purge policy (Entire
Pool), purges the connection pool. At the same time, connection handle is
also closed. DSRA9110E: Connection is
closed. : This exception is an outcome of the OracleXAException as the
connection handle is closed upon detecting a fatal connection error
and in the prepareStatemen() exception handling logic when WAS detect the
state of the connection as closed, its throw an ObjectClosedException.
After the XAException and the connection handle being closed,JDBC adapter tries to use same connection that is closed and this again results in an ObjectClosedException.

Below is the objectClosedException thrown:


[3/5/13 5:41:20:088 PST] 00000085 WSJdbcConnect > prepareStatement Entry

[3/5/13 5:41:20:094 PST] 00000085 InternalGener >
isAnAuthorizationException: Entry DSRA9110E: Connection is

Resolving the problem

A new activation spec property named - useConnectionPoolForPolling is added to the activation spec in order to resolve this problem. If the property is set to true, adapter uses a new connection from the connection pool for each event. This resolves the stale connection issue. However enabling the property to true will have impact on the performance of the adapter. For example, the rate of processing of events by the adapter may decrease. If the property is set to false the adapter will behave the same as before, and will not create a new connection for each event. This issue has been resolved in JDBC adapter Interim Fix v7.5.0.3_IF02.

Document information

More support for: WebSphere Adapters Family
Adapter for JDBC

Software version: 7.5

Operating system(s): AIX, Linux, Solaris, Windows

Software edition: WebSphere

Reference #: 1632918

Modified date: 2013-04-01