You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "nicolas de loof (JIRA)" <ax...@ws.apache.org> on 2005/09/02 08:44:12 UTC

[jira] Created: (AXIS-2206) use of session.getAttribute on HttpSession expiration

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


[jira] Commented: (AXIS-2206) use of session.getAttribute on HttpSession expiration

Posted by "Anders Soee (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS-2206?page=comments#action_12374029 ] 

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

tested on Axis 1.3, btw.

> 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


[jira] Commented: (AXIS-2206) use of session.getAttribute on HttpSession expiration

Posted by "Anders Soee (JIRA)" <ax...@ws.apache.org>.
    [ 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


[jira] Commented: (AXIS-2206) use of session.getAttribute on HttpSession expiration

Posted by "Olaf Krische (JIRA)" <ax...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS-2206?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12688786#action_12688786 ] 

Olaf Krische commented on AXIS-2206:
------------------------------------

There is definitly a difference between spec 2.3 and 2.4

Quoting servlet api spec 2.4 (SRV 1.6.1, sessionDestroyed)

---snip---
In the previous versions of the specification, this method was defined as:

             Notification that a session was invalidated.

As of Version 2.4, this method is changed to

             Notification that a session is about to be invalidated

so that it notifies before the session invalidation. 

If the code assumed the previous behavior, it must be modified to match the new behavior.
---snip---


> use of session.getAttribute on HttpSession expiration
> -----------------------------------------------------
>
>                 Key: AXIS-2206
>                 URL: https://issues.apache.org/jira/browse/AXIS-2206
>             Project: Axis
>          Issue Type: Bug
>          Components: Basic Architecture
>    Affects 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.
-
You can reply to this email to add a comment to the issue online.