APAR status
Closed as program error.
Error description
If a nonserializable object is bound to a session and
a serializable object is then bound to the session using the
same name the nonserializable object is not replaced. If
another nonserializable object is then bound to the session
using the same name the previously bound nonserializable
object is replaced.
Local fix
N/A
Problem summary
****************************************************************
* USERS AFFECTED: WebSphere Application Server 5.0 users of *
* sessions to save attributes. *
****************************************************************
* PROBLEM DESCRIPTION: If a session attribute is used to save *
* serializable data first, and then use *
* the same key to save the *
* non-serializable data, the data will *
* be lost. *
****************************************************************
* RECOMMENDATION: *
****************************************************************
Below is a sample snippet of code that will cause this problem
to arise:
<%@ page language="java" %>
<%@ page import="java.net.*" %>
<%
String name = "key1";
out.println("Session is getting started");
Socket nonSerializableObj = new Socket("localhost", 9080);
session.setAttribute(name, nonSerializableObj);
out.println("Non-Serializable Obj (should be socket) =
["+session.getAttribute(name)+"]");
String serializableObj = new String("1234");
session.setAttribute(name, serializableObj);
out.println("Non-Serializable Obj (should be string) =
["+session.getAttribute(name)+"]");
%>
the problem is caused because the non-serializable and
serializable data are saved in different places.
Problem conclusion
Before reassigning the key to a value, remove it from both
places if there is any.
Temporary fix
will go into ptf5021
Comments
APAR information |
APAR number |
PQ77576 |
Reported component name |
WAS BASE 5.0 |
Reported component ID |
5630A3600 |
Reported release |
00W |
Status |
CLOSED PER |
PE |
NoPE |
HIPER |
NoHIPER |
Special Attention |
NoSpecatt |
Submitted date |
2003-08-18 |
Closed date |
2003-09-18 |
Last modified date |
2003-09-18 |
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Modules/Macros
Publications Referenced
Applicable component levels |
R003 PSY |
UP |
R00A PSY |
UP |
R00H PSY |
UP |
R00I PSY |
UP |
R00P PSY |
UP |
R00S PSY |
UP |
R00W PSY |
UP |
|