axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anders Soee (JIRA)" <axis-...@ws.apache.org>
Subject [jira] Commented: (AXIS-2206) use of session.getAttribute on HttpSession expiration
Date Tue, 11 Apr 2006 09:18:20 GMT
    [ http://issues.apache.org/jira/browse/AXIS-2206?page=comments#action_12373989 ] 

Anders Soee commented on AXIS-2206:
-----------------------------------

I can confirm that this is an issue with resin 2.1.19, on jdk 1.5.0 too.

I believe there is a difference between servlet spec 2.3 and 2.4 with regards to when sessionDestroyed
 is called.

On 2.3 it is called AFTER the session is invalidated, and on 2.4 it is called right before.

This means that the call to session.getAttribute in AxisHTTPSessionListener is invalid on
a 2.3 container, 
and thus the listener itself is useless.

> use of session.getAttribute on HttpSession expiration
> -----------------------------------------------------
>
>          Key: AXIS-2206
>          URL: http://issues.apache.org/jira/browse/AXIS-2206
>      Project: Apache Axis
>         Type: Bug

>   Components: Basic Architecture
>     Versions: 1.2.1
>  Environment: tomcat 4.1.30 / Windows 2000 / JDK sun 1.4.2_06
>     Reporter: nicolas de loof
>     Priority: Minor

>
> from a Tomcat server runing Axis 1.2.1, I get stack trace on console :
> java.lang.IllegalStateException: "getAttribute": Session déjà invalidée
>    at org.apache.catalina.session.StandardSession.getAttribute(StandardSession.java:953)
>    at org.apache.catalina.session.StandardSessionFacade.getAttribute(StandardSessionFacade.java:171)
>    at org.apache.axis.transport.http.AxisHTTPSessionListener.destroySession(AxisHTTPSessionListener.java:43)
>    at org.apache.axis.transport.http.AxisHTTPSessionListener.sessionDestroyed(AxisHTTPSessionListener.java:72)
>    at org.apache.catalina.session.StandardSession.expire(StandardSession.java:658)
>    at org.apache.catalina.session.StandardSession.expire(StandardSession.java:607)
>    at org.apache.catalina.session.StandardManager.processExpires(StandardManager.java:793)
>    at org.apache.catalina.session.StandardManager.run(StandardManager.java:870)
>    at java.lang.Thread.run(Thread.java:534)
> In AxisHTTPSessionListener, on sessionDestroyed event, static destroySession() is called.
It uses getAttribute on session to search for AXIS_SESSION_MARKER. As session is currently
invalidated, this exception occurs. 
> It may be possible to use a HttpSessionBindingListener having references to ServiceLifecycle
instances and call destroy when session expires/invalidates.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message