PQ94124: CLASSCASTEXCEPTION AFTER RECEIVING STALECONNECTIONEXCEPTION WHILE RUNNING EJB. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() APAR status Closed as program error. Error description In order to handle stale connections in a local stateless session bean we adopt the following strategy: Catch the com.ibm.websphere.ce.cm.StaleConnectionException Invalidate the transaction using getSessionContext().setRollbackOnly() Rethrow a user defined exception. The class which accesses the stateless session bean`s method catches refreshes the connection after it fails. I should point out that we use a single physical connection to support our application. . In our production environment, we use Oracle 8i. . This strategy worked when we used WebSphere 5.0, but fails with WebSphere 5.1.0.3. In WebSphere 5.1.0.3 a ClassCastException is registered.Local fix No local fix.Problem summary **************************************************************** * USERS AFFECTED: WebSphere Application Server application * * developers of Enterprise Java Beans (EJBs). * **************************************************************** * PROBLEM DESCRIPTION: ClassCastException is thrown when an * * application logic is trying to * * recover from StaleConnectionException. * **************************************************************** * RECOMMENDATION: * **************************************************************** An application may have logic to recover from com.ibm.websphere.ce.cm.StaleConnectionException and throw an application exception. The client, instead of receiving application exception, gets ClassCastException incorrectly.Problem conclusion Modified logic to correctly handle such a case and avoid throwing of ClassCastException.Temporary fix Comments
APAR is sysrouted FROM one or more of the following: APAR is sysrouted TO one or more of the following: Modules/Macros
Publications Referenced
|
Product categories: Software > Application Servers >
Distributed Application & Web Servers > WebSphere Application
Server > General
Operating system(s):
Software version: 10A
Software edition:
Reference #: PQ94124
IBM Group: Software Group
Modified date: Jan 27, 2005
(C) Copyright IBM Corporation 2000, 2008. All Rights Reserved.