AxisHTTPSessionListener.destroySession does not call ServiceLifecycle.destroy()
-------------------------------------------------------------------------------
Key: AXIS-2660
URL: https://issues.apache.org/jira/browse/AXIS-2660
Project: Axis
Issue Type: Bug
Components: Basic Architecture
Affects Versions: 1.4
Environment: When AxisHTTPSessionListener.destroySession is called and
HttpSession contains an attribute with an instanceof ServiceLifecycle.
Reporter: Wayne Johnson
Fix For: current (nightly)
In the AxisHTTPSessionListener.destroySession() method, the session is queried
to see if it has any attributes listed that is an instance of ServiceLifecycle.
The code is in error. It gets an Enumeration of Strings via the
getAttributeNames() method, then runs through the Enumeration looking for an
instanceof ServiceLifecycle. What it should be doing is using the string to do
a getAttribute(), then test the returned attribute.
Patch:
***************
*** 49,58 ****
Enumeration e = session.getAttributeNames();
while (e.hasMoreElements()) {
! String next = (String)e.nextElement();
! Object o=session.getAttribute(next);
! if (o != null && o instanceof ServiceLifecycle) {
! ((ServiceLifecycle)o).destroy();
}
}
}
--- 49,57 ----
Enumeration e = session.getAttributeNames();
while (e.hasMoreElements()) {
! Object next = e.nextElement();
! if (next instanceof ServiceLifecycle) {
! ((ServiceLifecycle)next).destroy();
}
}
}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]