PQ70773: SESSION MANAGER DOES NOT PROPERLY UNWRAP OBJECT OF TYPE JAVAX.NAMING.CONTEXT WHEN GETTING IT FROM PERSISTENT DATABASE

 Fixes are available

5.0.1: WebSphere Application Server Version 5.0 Fix Pack 1 (Version 5.0.1)
5.0.1: WebSphere Application Server Enterprise Edition Version 5.0 Fix Pack 1



APAR status
Closed as program error.

Error description
If the customer persists an object of type javax.naming.Context,
the session manager wraps this object to make it distributable.
However, when the customer does a getAttribute(), the Session
Manager does not properly unwrap the object. The session manager
is returning an javax.naming.IntialContext object instead of
the object that was persisted. In the case of this customer,
this results in a java.lang.ClassCastException because they
cast the object to another type. However, the object they are
casting is not the object they put into the HttpSession
Local fix Problem summary
****************************************************************
* USERS AFFECTED: WebSphere Application Server -- Session      *
*                 Manager Users                                *
****************************************************************
* PROBLEM DESCRIPTION: ClassCast Exceptions are being thrown   *
*                      when an object indirectly implementing  *
*                      the EJBHome, EJBObject or the Context   *
*                      interface is stored in a session        *
*                      object.                                 *
****************************************************************
* RECOMMENDATION:                                              *
****************************************************************
The J2EE spec requires that objects of type EJBHome, EJBObject
or javax.naming.Context of type java:comp/env bound to the
session object be distributable.  Objects which indirectly
implement any of these intefaces should be treated like any
other serializable object and should be persisted to the
database.  For example, if an interface extends the EJBObject
and is implemented by another class which is then stored in
the session object the implementing class should not be treated
as an EJBObject.  The session manager was doing this resulting
in ClassCastExceptions being thrown.  This problem will be seen
only in the persistence mode.
Problem conclusion
This fix will not treat objects which extend EJBObject,
EJBHome and or Context as distributable objects and will
consider them like any other java object stored in the Session
Object.
Temporary fix
PQ66060.jar
Comments
APAR information
APAR number PQ70773
Reported component name WAS BASE 5.0
Reported component ID 5630A3600
Reported release 00S
Status CLOSED PER
PE NoPE
HIPER NoHIPER
Special Attention NoSpecatt
Submitted date 2003-02-07
Closed date 2003-02-07
Last modified date 2003-02-07

APAR is sysrouted FROM one or more of the following:
PQ66060

APAR is sysrouted TO one or more of the following:

Modules/Macros
SESSIONS          

Publications Referenced

Fix information
Fixed component name WAS BASE 5.0
Fixed component ID 5630A3600

Applicable component levels
R00S PSY    UP


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > General
Operating system(s):
Software version: 00S
Software edition:
Reference #: PQ70773
IBM Group: Software Group
Modified date: Feb 7, 2003