[ https://issues.apache.org/jira/browse/AXIS-2780?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Olaf Krische updated AXIS-2780: ------------------------------- Description: The current code is: Enumeration e = session.getAttributeNames(); while (e.hasMoreElements()) { Object next = e.nextElement(); if (next instanceof ServiceLifecycle) { ((ServiceLifecycle)next).destroy(); } } 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. was: The current code is: Enumeration e = session.getAttributeNames(); while (e.hasMoreElements()) { Object next = e.nextElement(); if (next instanceof ServiceLifecycle) { ((ServiceLifecycle)next).destroy(); } } 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. Maybe a SessionBindingListener for servlet 2.3 should be offered. See AXIS-2206 > AxisHTTPSessionListener does not destroy ServiceLifeCycles, as it is supposed > to > -------------------------------------------------------------------------------- > > Key: AXIS-2780 > URL: https://issues.apache.org/jira/browse/AXIS-2780 > Project: Axis > Issue Type: Bug > Components: Basic Architecture > Affects Versions: 1.4 > Reporter: Olaf Krische > Fix For: 1.4 > > > The current code is: > Enumeration e = session.getAttributeNames(); > while (e.hasMoreElements()) { > Object next = e.nextElement(); > if (next instanceof ServiceLifecycle) { > ((ServiceLifecycle)next).destroy(); > } > } > 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. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.