[jboss-svn-commits] JBoss Portal SVN: r5186 - in trunk/wsrp/src: main/org/jboss/portal/wsrp main/org/jboss/portal/wsrp/aspects/portlet resources/portal-wsrp-sar/META-INF resources/test-wsrp-producer-sar/META-INF

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Tue Sep 12 14:52:55 EDT 2006


Author: julien at jboss.com
Date: 2006-09-12 14:52:46 -0400 (Tue, 12 Sep 2006)
New Revision: 5186

Removed:
   trunk/wsrp/src/main/org/jboss/portal/wsrp/aspects/portlet/SessionInterceptor.java
Modified:
   trunk/wsrp/src/main/org/jboss/portal/wsrp/WSRPProducer.java
   trunk/wsrp/src/resources/portal-wsrp-sar/META-INF/jboss-service.xml
   trunk/wsrp/src/resources/test-wsrp-producer-sar/META-INF/jboss-service.xml
Log:
removing the obsolete session interceptor now that we have a better solution.

Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/WSRPProducer.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/wsrp/WSRPProducer.java	2006-09-12 18:11:27 UTC (rev 5185)
+++ trunk/wsrp/src/main/org/jboss/portal/wsrp/WSRPProducer.java	2006-09-12 18:52:46 UTC (rev 5186)
@@ -44,12 +44,6 @@
    /** The value used to specify that a session will never expire. */
    int INFINITE_SESSION_EXPIRATION_TIME = -1;
 
-   /** Key under which the session is stored in the invocation attributes. */
-   String SESSION_ATTRIBUTE = "portal.wsrp.session";
-
-   /** Key under which the session id is stored in the invocation attributes. */
-   String SESSION_ID_ATTRIBUTE = "portal.wsrp.session.id";
-
    /**
     * Specifies whether this Producer requires clients to be registered or not.
     *

Deleted: trunk/wsrp/src/main/org/jboss/portal/wsrp/aspects/portlet/SessionInterceptor.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/wsrp/aspects/portlet/SessionInterceptor.java	2006-09-12 18:11:27 UTC (rev 5185)
+++ trunk/wsrp/src/main/org/jboss/portal/wsrp/aspects/portlet/SessionInterceptor.java	2006-09-12 18:52:46 UTC (rev 5186)
@@ -1,78 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-
-package org.jboss.portal.wsrp.aspects.portlet;
-
-import org.jboss.portal.portlet.invocation.PortletInterceptor;
-import org.jboss.portal.portlet.invocation.PortletInvocation;
-import org.jboss.portal.wsrp.WSRPProducer;
-import org.jboss.portal.wsrp.core.InvalidSessionFault;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpSession;
-
-/**
- * Implements session handling for WSRP.
- *
- * @author <a href="mailto:chris.laprun at jboss.com">Chris Laprun</a>
- * @version $Revision$
- * @since 2.4
- */
-public class SessionInterceptor extends PortletInterceptor
-{
-   protected void invoke(PortletInvocation invocation) throws Exception
-   {
-      // retrieve the current session id if one exists
-      HttpServletRequest drq = invocation.getDispatchedRequest();
-      String previousSessionId = getSessionId(drq.getSession(false));
-
-      // continue the invocation
-      invocation.invokeNext();
-
-      // get the new session id if any
-      HttpSession session = drq.getSession(false);
-      String sessionId = getSessionId(session);
-
-      // we need to deal with the session id
-      if (sessionId != null)
-      {
-         // we originally didn't have a session id or the previous session id is the same as the current one, so the
-         // portlet to which this invocation was dispatched interacted with session, we need to inform MarkupHandler
-         if (previousSessionId == null || sessionId.equals(previousSessionId))
-         {
-            invocation.setAttribute(PortletInvocation.REQUEST_SCOPE, WSRPProducer.SESSION_ID_ATTRIBUTE, sessionId);
-            invocation.setAttribute(PortletInvocation.REQUEST_SCOPE, WSRPProducer.SESSION_ATTRIBUTE, session);
-         }
-         else
-         {
-            session.invalidate();
-            throw new InvalidSessionFault();
-         }
-      }
-
-   }
-
-   private String getSessionId(HttpSession session)
-   {
-      return session != null ? session.getId() : null;
-   }
-}

Modified: trunk/wsrp/src/resources/portal-wsrp-sar/META-INF/jboss-service.xml
===================================================================
--- trunk/wsrp/src/resources/portal-wsrp-sar/META-INF/jboss-service.xml	2006-09-12 18:11:27 UTC (rev 5185)
+++ trunk/wsrp/src/resources/portal-wsrp-sar/META-INF/jboss-service.xml	2006-09-12 18:52:46 UTC (rev 5186)
@@ -3,13 +3,6 @@
 
    <!-- Producer interceptor stack -->
    <mbean
-      code="org.jboss.portal.wsrp.aspects.portlet.SessionInterceptor"
-      name="portal:service=Interceptor,type=Portlet,name=Session"
-      xmbean-dd=""
-      xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
-      <xmbean/>
-   </mbean>
-   <mbean
       code="org.jboss.portal.server.impl.invocation.JBossInterceptorStackFactory"
       name="portal:service=InterceptorStackFactory,type=WSRP"
       xmbean-dd=""
@@ -19,7 +12,6 @@
          <depends-list-element>portal:service=Interceptor,type=Portlet,name=ContextDispatcher</depends-list-element>
          <depends-list-element>portal:service=Interceptor,type=Portlet,name=WindowStates</depends-list-element>
          <depends-list-element>portal:service=Interceptor,type=Portlet,name=Modes</depends-list-element>
-         <depends-list-element>portal:service=Interceptor,type=Portlet,name=Session</depends-list-element>
       </depends-list>
    </mbean>
 

Modified: trunk/wsrp/src/resources/test-wsrp-producer-sar/META-INF/jboss-service.xml
===================================================================
--- trunk/wsrp/src/resources/test-wsrp-producer-sar/META-INF/jboss-service.xml	2006-09-12 18:11:27 UTC (rev 5185)
+++ trunk/wsrp/src/resources/test-wsrp-producer-sar/META-INF/jboss-service.xml	2006-09-12 18:52:46 UTC (rev 5186)
@@ -51,13 +51,6 @@
       <xmbean/>
    </mbean>
    <mbean
-      code="org.jboss.portal.wsrp.aspects.portlet.SessionInterceptor"
-      name="portal:service=Interceptor,type=Portlet,name=Session"
-      xmbean-dd=""
-      xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
-      <xmbean/>
-   </mbean>
-   <mbean
       code="org.jboss.portal.server.impl.invocation.JBossInterceptorStackFactory"
       name="portal:service=InterceptorStackFactory,type=Container"
       xmbean-dd=""
@@ -67,7 +60,6 @@
          <depends-list-element>portal:service=Interceptor,type=Portlet,name=ContextDispatcher</depends-list-element>
          <depends-list-element>portal:service=Interceptor,type=Portlet,name=WindowStates</depends-list-element>
          <depends-list-element>portal:service=Interceptor,type=Portlet,name=Modes</depends-list-element>
-         <depends-list-element>portal:service=Interceptor,type=Portlet,name=Session</depends-list-element>
       </depends-list>
    </mbean>
 




More information about the jboss-svn-commits mailing list