[jboss-svn-commits] JBoss Portal SVN: r5197 - in branches/JBoss_Portal_Branch_2_4: portlet/src/main/org/jboss/portal/portlet/aspects/portlet server server/src/main/org/jboss/portal/server/servlet server/src/main/org/jboss/portal/test/server server/src/resources/test wsrp/src/main/org/jboss/portal/wsrp wsrp/src/main/org/jboss/portal/wsrp/aspects/portlet wsrp/src/resources/portal-wsrp-sar/META-INF wsrp/src/resources/test-wsrp-producer-sar/META-INF
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Thu Sep 14 09:31:16 EDT 2006
Author: julien at jboss.com
Date: 2006-09-14 09:30:52 -0400 (Thu, 14 Sep 2006)
New Revision: 5197
Removed:
branches/JBoss_Portal_Branch_2_4/server/src/main/org/jboss/portal/server/servlet/ProxyRequest.java
branches/JBoss_Portal_Branch_2_4/server/src/main/org/jboss/portal/server/servlet/ProxyResponse.java
branches/JBoss_Portal_Branch_2_4/server/src/main/org/jboss/portal/test/server/session/
branches/JBoss_Portal_Branch_2_4/server/src/resources/test/test-session-sar/
branches/JBoss_Portal_Branch_2_4/wsrp/src/main/org/jboss/portal/wsrp/aspects/portlet/SessionInterceptor.java
Modified:
branches/JBoss_Portal_Branch_2_4/portlet/src/main/org/jboss/portal/portlet/aspects/portlet/ContextDispatcherInterceptor.java
branches/JBoss_Portal_Branch_2_4/server/build.xml
branches/JBoss_Portal_Branch_2_4/wsrp/src/main/org/jboss/portal/wsrp/WSRPProducer.java
branches/JBoss_Portal_Branch_2_4/wsrp/src/resources/portal-wsrp-sar/META-INF/jboss-service.xml
branches/JBoss_Portal_Branch_2_4/wsrp/src/resources/test-wsrp-producer-sar/META-INF/jboss-service.xml
Log:
remove obsolete stuff due to better integration of http session with wsrp
Modified: branches/JBoss_Portal_Branch_2_4/portlet/src/main/org/jboss/portal/portlet/aspects/portlet/ContextDispatcherInterceptor.java
===================================================================
--- branches/JBoss_Portal_Branch_2_4/portlet/src/main/org/jboss/portal/portlet/aspects/portlet/ContextDispatcherInterceptor.java 2006-09-14 13:03:02 UTC (rev 5196)
+++ branches/JBoss_Portal_Branch_2_4/portlet/src/main/org/jboss/portal/portlet/aspects/portlet/ContextDispatcherInterceptor.java 2006-09-14 13:30:52 UTC (rev 5197)
@@ -88,7 +88,7 @@
catch (ServletException e)
{
// Unwrap underlying exception if any
- Throwable t = Exceptions.unwrap(e.getRootCause());
+ Throwable t = e.getRootCause();
//
if (t instanceof Error)
Modified: branches/JBoss_Portal_Branch_2_4/server/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_4/server/build.xml 2006-09-14 13:03:02 UTC (rev 5196)
+++ branches/JBoss_Portal_Branch_2_4/server/build.xml 2006-09-14 13:30:52 UTC (rev 5197)
@@ -195,20 +195,6 @@
<fileset dir="${build.lib}" includes="test-servlet-defaultservletmapping.war"/>
</jar>
- <jar jarfile="${build.lib}/test-session.war">
- <fileset dir="${build.resources}/test/test-session-war"/>
- </jar>
- <jar jarfile="${build.lib}/test-session.sar">
-
- <fileset dir="${jboss.portal-common.root}/lib" includes="portal-common-lib.jar"/>
- <fileset dir="${build.lib}" includes="test-agent.war"/>
- <fileset dir="${build.lib}" includes="portal-server-lib.jar"/>
- <fileset dir="${build.lib}" includes="portal-server-test-lib.jar"/>
-
- <fileset dir="${build.resources}/test/test-session-sar"/>
- <fileset dir="${build.lib}" includes="test-session.war"/>
- </jar>
-
<jar jarfile="${build.lib}/test-charset.sar">
<fileset dir="${jboss.portal-common.root}/lib" includes="portal-common-lib.jar"/>
@@ -276,7 +262,6 @@
<!-- Server side tests -->
<test todir="${test.reports}" name="org.jboss.portal.test.server.parameters.ParametersTestSuite"/>
<test todir="${test.reports}" name="org.jboss.portal.test.server.servlet.ServletTestSuite"/>
- <test todir="${test.reports}" name="org.jboss.portal.test.server.session.SessionTestSuite"/>
<test todir="${test.reports}" name="org.jboss.portal.test.server.charset.CharsetTestSuite"/>
</x-test>
<x-classpath>
Deleted: branches/JBoss_Portal_Branch_2_4/server/src/main/org/jboss/portal/server/servlet/ProxyRequest.java
===================================================================
--- branches/JBoss_Portal_Branch_2_4/server/src/main/org/jboss/portal/server/servlet/ProxyRequest.java 2006-09-14 13:03:02 UTC (rev 5196)
+++ branches/JBoss_Portal_Branch_2_4/server/src/main/org/jboss/portal/server/servlet/ProxyRequest.java 2006-09-14 13:30:52 UTC (rev 5197)
@@ -1,166 +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.server.servlet;
-
-import org.jboss.portal.server.servlet.AbstractDelegatingRequest;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpSession;
-import javax.servlet.http.HttpSessionContext;
-import javax.servlet.ServletContext;
-import java.util.Enumeration;
-
-/**
- * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
- * @version $Revision$
- */
-public class ProxyRequest extends AbstractDelegatingRequest
-{
-
- private HttpServletRequest delegate;
- private String sessionId;
- private HttpSession proxySession;
-
- public ProxyRequest(HttpServletRequest delegate, String sessionId)
- {
- this.delegate = delegate;
- this.sessionId = sessionId;
- this.proxySession = new ProxySession();
- }
-
- protected HttpServletRequest getDelegate()
- {
- return delegate;
- }
-
- public HttpSession getSession(boolean create)
- {
- HttpSession session = delegate.getSession(create);
- if (session == null)
- {
- return null;
- }
- else
- {
- return proxySession;
- }
- }
-
- public HttpSession getSession()
- {
- delegate.getSession();
- return proxySession;
- }
-
- public class ProxySession implements HttpSession
- {
-
- public ProxySession()
- {
- }
-
- public long getCreationTime()
- {
- return ProxyRequest.this.getSession().getCreationTime();
- }
-
- public String getId()
- {
- return sessionId;
- }
-
- public long getLastAccessedTime()
- {
- return ProxyRequest.this.getSession().getLastAccessedTime();
- }
-
- public ServletContext getServletContext()
- {
- return ProxyRequest.this.getSession().getServletContext();
- }
-
- public void setMaxInactiveInterval(int i)
- {
- ProxyRequest.this.getSession().setMaxInactiveInterval(i);
- }
-
- public int getMaxInactiveInterval()
- {
- return ProxyRequest.this.getSession().getMaxInactiveInterval();
- }
-
- public HttpSessionContext getSessionContext()
- {
- return ProxyRequest.this.getSession().getSessionContext();
- }
-
- public Object getAttribute(String name)
- {
- return ProxyRequest.this.getSession().getAttribute(name);
- }
-
- public Object getValue(String name)
- {
- return ProxyRequest.this.getSession().getValue(name);
- }
-
- public Enumeration getAttributeNames()
- {
- return ProxyRequest.this.getSession().getAttributeNames();
- }
-
- public String[] getValueNames()
- {
- return ProxyRequest.this.getSession().getValueNames();
- }
-
- public void setAttribute(String name, Object object)
- {
- ProxyRequest.this.getSession().setAttribute(name, object);
- }
-
- public void putValue(String name, Object object)
- {
- ProxyRequest.this.getSession().putValue(name, object);
- }
-
- public void removeAttribute(String name)
- {
- ProxyRequest.this.getSession().removeAttribute(name);
- }
-
- public void removeValue(String name)
- {
- ProxyRequest.this.getSession().removeValue(name);
- }
-
- public void invalidate()
- {
- ProxyRequest.this.getSession().invalidate();
- }
-
- public boolean isNew()
- {
- return ProxyRequest.this.getSession().isNew();
- }
- }
-}
Deleted: branches/JBoss_Portal_Branch_2_4/server/src/main/org/jboss/portal/server/servlet/ProxyResponse.java
===================================================================
--- branches/JBoss_Portal_Branch_2_4/server/src/main/org/jboss/portal/server/servlet/ProxyResponse.java 2006-09-14 13:03:02 UTC (rev 5196)
+++ branches/JBoss_Portal_Branch_2_4/server/src/main/org/jboss/portal/server/servlet/ProxyResponse.java 2006-09-14 13:30:52 UTC (rev 5197)
@@ -1,46 +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.server.servlet;
-
-import org.jboss.portal.server.servlet.AbstractDelegatingResponse;
-
-import javax.servlet.http.HttpServletResponse;
-
-/**
- * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
- * @version $Revision$
- */
-public class ProxyResponse extends AbstractDelegatingResponse
-{
-
- private HttpServletResponse delegate;
-
- public ProxyResponse(HttpServletResponse delegate)
- {
- this.delegate = delegate;
- }
-
- protected HttpServletResponse getDelegate()
- {
- return delegate;
- }
-}
Modified: branches/JBoss_Portal_Branch_2_4/wsrp/src/main/org/jboss/portal/wsrp/WSRPProducer.java
===================================================================
--- branches/JBoss_Portal_Branch_2_4/wsrp/src/main/org/jboss/portal/wsrp/WSRPProducer.java 2006-09-14 13:03:02 UTC (rev 5196)
+++ branches/JBoss_Portal_Branch_2_4/wsrp/src/main/org/jboss/portal/wsrp/WSRPProducer.java 2006-09-14 13:30:52 UTC (rev 5197)
@@ -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: branches/JBoss_Portal_Branch_2_4/wsrp/src/main/org/jboss/portal/wsrp/aspects/portlet/SessionInterceptor.java
===================================================================
--- branches/JBoss_Portal_Branch_2_4/wsrp/src/main/org/jboss/portal/wsrp/aspects/portlet/SessionInterceptor.java 2006-09-14 13:03:02 UTC (rev 5196)
+++ branches/JBoss_Portal_Branch_2_4/wsrp/src/main/org/jboss/portal/wsrp/aspects/portlet/SessionInterceptor.java 2006-09-14 13:30:52 UTC (rev 5197)
@@ -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(WSRPProducer.SESSION_ID_ATTRIBUTE, sessionId);
- invocation.setAttribute(WSRPProducer.SESSION_ATTRIBUTE, session);
- }
- else
- {
- session.invalidate();
- throw new InvalidSessionFault();
- }
- }
-
- }
-
- private String getSessionId(HttpSession session)
- {
- return session != null ? session.getId() : null;
- }
-}
Modified: branches/JBoss_Portal_Branch_2_4/wsrp/src/resources/portal-wsrp-sar/META-INF/jboss-service.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_4/wsrp/src/resources/portal-wsrp-sar/META-INF/jboss-service.xml 2006-09-14 13:03:02 UTC (rev 5196)
+++ branches/JBoss_Portal_Branch_2_4/wsrp/src/resources/portal-wsrp-sar/META-INF/jboss-service.xml 2006-09-14 13:30:52 UTC (rev 5197)
@@ -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.common.system.JBossServiceModelMBean">
- <xmbean/>
- </mbean>
- <mbean
code="org.jboss.portal.server.impl.invocation.JBossInterceptorStack"
name="portal:service=InterceptorStack,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: branches/JBoss_Portal_Branch_2_4/wsrp/src/resources/test-wsrp-producer-sar/META-INF/jboss-service.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_4/wsrp/src/resources/test-wsrp-producer-sar/META-INF/jboss-service.xml 2006-09-14 13:03:02 UTC (rev 5196)
+++ branches/JBoss_Portal_Branch_2_4/wsrp/src/resources/test-wsrp-producer-sar/META-INF/jboss-service.xml 2006-09-14 13:30:52 UTC (rev 5197)
@@ -45,13 +45,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.common.system.JBossServiceModelMBean">
- <xmbean/>
- </mbean>
- <mbean
code="org.jboss.portal.server.impl.invocation.JBossInterceptorStack"
name="portal:service=InterceptorStack,type=Container"
xmbean-dd=""
@@ -61,7 +54,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