How a JCA resource adapter can trigger the WebSphere Application Server Connection Manager to purge the connection pool
 Technote (troubleshooting)
 
Problem(Abstract)
JCA connection pools configured in WebSphere Application Server V5 and V6 contain a Purge Policy property which specifies how the WebSphere connection manager should purge the connection pool after a StaleConnectionException or a fatal connection error occurs. The Purge Policy can be set to FailingConnectionOnly or EntirePool.

StaleConnectionExceptions are only thrown when the connection is obtained from a WebSphere Application Server data source. In this case, the built-in relational resource adapter (RRA) is used.
If the RRA is not used, and some other JCA resource adapter is being used to connect to the backend resource, how does the resource adapter inform the WebSphere connection manager that a fatal connection error has occurred so that the connection pool can be purged according to the Purge Policy?
 
Resolving the problem
The resource adapter needs to call the connectionErrorOccurred(ConnectionEvent event) method to inform the WebSphere connection manager that a fatal connection error has occurred. When this method is called, the connection pool will be purged according to the Purge Policy that is set for the JCA connection pool.

The connectionErrorOccurred(ConnectionEvent event) method is discussed in Section 5.5.6 of the JCA 1.0 specification.

 
 
Cross Reference information
Segment Product Component Platform Version Edition
Application Servers Runtimes for Java Technology Java SDK
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > Java 2 Connectivity (J2C)
Operating system(s): Windows
Software version: 6.0.2.2
Software edition:
Reference #: 1218631
IBM Group: Software Group
Modified date: Sep 29, 2005