portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r449498 - /portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/container/session/PortalSessionMonitorImpl.java
Date Sun, 24 Sep 2006 21:51:19 GMT
Author: ate
Date: Sun Sep 24 14:51:19 2006
New Revision: 449498

URL: http://svn.apache.org/viewvc?view=rev&rev=449498
Log:
Workaround for InvalidStateException thrown by Tomcat 5.5.x < 5.5.16 on session.getId()
after the session is invalidated

Modified:
    portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/container/session/PortalSessionMonitorImpl.java

Modified: portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/container/session/PortalSessionMonitorImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/container/session/PortalSessionMonitorImpl.java?view=diff&rev=449498&r1=449497&r2=449498
==============================================================================
--- portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/container/session/PortalSessionMonitorImpl.java
(original)
+++ portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/container/session/PortalSessionMonitorImpl.java
Sun Sep 24 14:51:19 2006
@@ -33,6 +33,7 @@
     private static final long serialVersionUID = 1239564779524373742L;
 
     private long sessionKey;
+    private transient String sessionId;
     private transient HttpSession session;
     
     public PortalSessionMonitorImpl(long sessionKey)
@@ -45,8 +46,7 @@
      */
     public String getSessionId()
     {
-        HttpSession thisSession = session;
-        return thisSession != null ? thisSession.getId() : null;
+        return sessionId;
     }
 
     /* (non-Javadoc)
@@ -84,6 +84,7 @@
     public void valueBound(HttpSessionBindingEvent event)
     {
         this.session = event.getSession();
+        this.sessionId = session.getId();
     }
 
     /* (non-Javadoc)
@@ -107,7 +108,8 @@
      */
     public void sessionDidActivate(HttpSessionEvent event)
     {
-        this.session = event.getSession();
+        session = event.getSession();
+        sessionId = session.getId();
         PortalSessionsManager manager = getManager();
         if (manager != null)
         {



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message