Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.4
-
None
Description
The current code is:
Enumeration e = session.getAttributeNames();
while (e.hasMoreElements()) {
Object next = e.nextElement();
if (next instanceof ServiceLifecycle)
}
This code will do nothing but iterate over the "Strings" returned by getAttributeNames().
Probably you wanted to do that:
Enumeration e = session.getAttributeNames();
while (e.hasMoreElements()) {
String attributeName = e.nextElement().toString();
Object next = session.getAttribute(key);
if (next != null && next instanceof ServiceLifecycle) { ((ServiceLifecycle)next).destroy(); }
}
In any way, the listener is only servlet 2.4+ compatible.