portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From woon...@apache.org
Subject svn commit: r587066 [3/3] - in /portals/jetspeed-2/trunk: ./ components/jetspeed-portal/ components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/ components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/invoker/ compo...
Date Mon, 22 Oct 2007 11:57:41 GMT
Modified: portals/jetspeed-2/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/invoker/ServletPortletInvoker.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/invoker/ServletPortletInvoker.java?rev=587066&r1=587065&r2=587066&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/invoker/ServletPortletInvoker.java
(original)
+++ portals/jetspeed-2/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/invoker/ServletPortletInvoker.java
Mon Oct 22 04:57:40 2007
@@ -16,6 +16,7 @@
  */
 package org.apache.jetspeed.container.invoker;
 
+import java.lang.reflect.Constructor;
 import java.io.IOException;
 
 import javax.portlet.ActionRequest;
@@ -43,7 +44,6 @@
 import org.apache.jetspeed.factory.PortletInstance;
 import org.apache.jetspeed.om.common.portlet.MutablePortletApplication;
 import org.apache.jetspeed.request.RequestContext;
-import org.apache.jetspeed.aggregator.Worker;
 import org.apache.jetspeed.aggregator.CurrentWorkerContext;
 import org.apache.pluto.om.portlet.PortletDefinition;
 import org.apache.pluto.om.servlet.WebApplicationDefinition;
@@ -78,8 +78,21 @@
     protected PortletDefinition portletDefinition;
     protected boolean activated = false;
     protected String servletMappingName;
+    
+    /**
+     * Wheter the servlet request instance should be wrapped or not if it is under WebSphere
environment.
+     */
+    protected boolean wrapRequestOfWebSphere;
 
- 
+    public ServletPortletInvoker()
+    {
+        this(false);
+    }
+    
+    public ServletPortletInvoker(boolean wrapRequestOfWebSphere)
+    {
+        this.wrapRequestOfWebSphere = wrapRequestOfWebSphere;
+    }
 
     /* (non-Javadoc)
      * @see org.apache.jetspeed.container.invoker.JetspeedPortletInvoker#passivate()
@@ -173,7 +186,7 @@
 
         // In case of parallel mode, get portlet definition object from the worker thread
context.
         // Otherwise, refer the member variable.
-        boolean isParallelMode = (Thread.currentThread() instanceof Worker || CurrentWorkerContext.getCurrentWorkerContextUsed());
+        boolean isParallelMode = CurrentWorkerContext.getParallelRenderingMode();
 
         if (isParallelMode)
         {
@@ -194,11 +207,6 @@
         }
         String portletApplicationName = webApplicationDefinition.getContextRoot();
 
-        // gather all required data from request and response
-        ServletRequest servletRequest = ((HttpServletRequestWrapper)((HttpServletRequestWrapper)((HttpServletRequestWrapper)portletRequest).getRequest()).getRequest()).getRequest();
-
-        ServletResponse servletResponse = ((HttpServletResponseWrapper) portletResponse).getResponse();
-
         ServletContext appContext = jetspeedContext.getContext(portletApplicationName);
         if (null == appContext)
         {
@@ -219,6 +227,10 @@
             throw new PortletException(message);
         }
 
+        // gather all required data from request and response
+        ServletRequest servletRequest = getServletRequestForContainer(portletRequest, appContext);
+        ServletResponse servletResponse = getServletResponseForContainer(portletResponse);
+
         try
         {
             RequestContext requestContext = (RequestContext) servletRequest.getAttribute(PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE);
@@ -297,4 +309,75 @@
 
     }
 
+    protected ServletRequest getServletRequestForContainer(PortletRequest portletRequest,
ServletContext appContext)
+    {
+        ServletRequest servletRequest = ((HttpServletRequestWrapper)((HttpServletRequestWrapper)((HttpServletRequestWrapper)portletRequest).getRequest()).getRequest()).getRequest();
+        
+        if (this.wrapRequestOfWebSphere && CurrentWorkerContext.getParallelRenderingMode())
+        {
+            String entAppNameOnWebSphere = (String) appContext.getAttribute("com.ibm.websphere.servlet.enterprise.application.name");
+            
+            // If the container is WebSphere, wrap the request.
+            if (entAppNameOnWebSphere != null)
+            {
+                try
+                {
+                    servletRequest = wrapWebSphereSRTServletRequest(servletRequest);
+                }
+                catch (Throwable th)
+                {
+                    log.error("Failed to load websphere system classes.", th);
+                }
+            }
+        }
+        
+        return servletRequest;
+    }
+
+    protected ServletResponse getServletResponseForContainer(PortletResponse portletResponse)
+    {
+        ServletResponse servletResponse = ((HttpServletResponseWrapper) portletResponse).getResponse();
+        return servletResponse;
+    }
+
+    private static Class adjustedSRTServletRequestClazz;
+    private static Constructor adjustedSRTServletRequestClazzConstructor;
+    
+    private static ServletRequest wrapWebSphereSRTServletRequest(ServletRequest servletRequest)
throws Throwable
+    {
+        if (adjustedSRTServletRequestClazzConstructor == null)
+        {
+            if (adjustedSRTServletRequestClazz == null)
+            {
+                synchronized (ServletPortletInvoker.class)
+                {
+                    if (adjustedSRTServletRequestClazz == null)
+                    {
+                        adjustedSRTServletRequestClazz = new AdjustedSRTServletRequestClassLoader().defineAdjustedSRTServletRequestClass();
+                    }
+                }
+            }
+            
+            adjustedSRTServletRequestClazzConstructor = adjustedSRTServletRequestClazz.getConstructors()[0];
+        }
+
+        Object [] args = new Object [] { servletRequest };
+        return (ServletRequest) adjustedSRTServletRequestClazzConstructor.newInstance(args);
+    }
+    
+    private static class AdjustedSRTServletRequestClassLoader extends ClassLoader
+    {
+        public AdjustedSRTServletRequestClassLoader()
+        {
+            super(PortletRequestContext.class.getClassLoader());
+        }
+        
+        public Class defineAdjustedSRTServletRequestClass() throws Throwable
+        {
+            byte [] bytes = AdjustedSRTServletRequestDump.dumpInner1();
+            Class inner1 = defineClass("org.apache.jetspeed.container.invoker.AdjustedSRTServletRequest$1",
bytes, 0, bytes.length);
+            bytes = AdjustedSRTServletRequestDump.dump();
+            return defineClass("org.apache.jetspeed.container.invoker.AdjustedSRTServletRequest",
bytes, 0, bytes.length);
+        }
+    }
 }

Modified: portals/jetspeed-2/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/invoker/ServletPortletInvokerFactory.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/invoker/ServletPortletInvokerFactory.java?rev=587066&r1=587065&r2=587066&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/invoker/ServletPortletInvokerFactory.java
(original)
+++ portals/jetspeed-2/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/invoker/ServletPortletInvokerFactory.java
Mon Oct 22 04:57:40 2007
@@ -1,9 +1,9 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
  * 
  *      http://www.apache.org/licenses/LICENSE-2.0
@@ -23,6 +23,22 @@
  */
 public class ServletPortletInvokerFactory 
 {
+
+    /**
+     * Wheter the servlet request instance should be wrapped or not if it is under WebSphere
environment.
+     */
+    protected boolean wrapRequestOfWebSphere;
+    
+    public ServletPortletInvokerFactory()
+    {
+        this(false);
+    }
+
+    public ServletPortletInvokerFactory(boolean wrapRequestOfWebSphere)
+    {
+        this.wrapRequestOfWebSphere = wrapRequestOfWebSphere;
+    }
+
     /**
      * <p>
      * createInstance
@@ -34,7 +50,7 @@
      */
     public ServletPortletInvoker createInstance() 
     {  
-        return new ServletPortletInvoker();        
+        return new ServletPortletInvoker(this.wrapRequestOfWebSphere);        
     }
 
     /**

Modified: portals/jetspeed-2/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/session/PortalSessionMonitorImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/session/PortalSessionMonitorImpl.java?rev=587066&r1=587065&r2=587066&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/session/PortalSessionMonitorImpl.java
(original)
+++ portals/jetspeed-2/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/session/PortalSessionMonitorImpl.java
Mon Oct 22 04:57:40 2007
@@ -64,6 +64,11 @@
     {
         return sessionKey;
     }
+    
+    public HttpSession getSession()
+    {
+        return session;
+    }
 
 
     /* (non-Javadoc)

Modified: portals/jetspeed-2/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/session/PortalSessionsManagerImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/session/PortalSessionsManagerImpl.java?rev=587066&r1=587065&r2=587066&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/session/PortalSessionsManagerImpl.java
(original)
+++ portals/jetspeed-2/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/session/PortalSessionsManagerImpl.java
Mon Oct 22 04:57:40 2007
@@ -23,6 +23,9 @@
 
 import javax.servlet.http.HttpSession;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
 /**
  * PortalSessionsManagerImpl
  *
@@ -31,6 +34,9 @@
  */
 public class PortalSessionsManagerImpl implements PortalSessionsManager
 {
+
+    private static Log log = LogFactory.getLog(PortalSessionsManagerImpl.class);
+    
     private static final class PortalSessionRegistry
     {
         long portalSessionKey;
@@ -139,6 +145,13 @@
     {
         if ( portalSession != null && paSession != null )
         {
+            if (portalSession == paSession)
+            {
+                // On WebSphere 6.1.0.11, strange symptoms like this occur...
+                log.warn("servlet context name of paSession(" + paSession.getId() + "): "
+ paSession.getServletContext().getServletContextName());
+                return;
+            }
+
             PortalSessionRegistry psr = (PortalSessionRegistry)portalSessionsRegistry.get(portalSession.getId());
             if (psr == null)
             {
@@ -225,7 +238,9 @@
             psr.psm = new PortalSessionMonitorImpl(-1);
             portalSessionsRegistry.put(restoredPasm.getPortalSessionId(), psr);
         }
+        
         // save the restored instance
+        restoredPasm.getSession().setAttribute(PortletApplicationSessionMonitor.SESSION_KEY,
restoredPasm);
         psr.sessionMonitors.put(restoredPasm.getContextPath(), restoredPasm);
     }
 

Modified: portals/jetspeed-2/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/engine/servlet/ServletRequestImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/engine/servlet/ServletRequestImpl.java?rev=587066&r1=587065&r2=587066&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/engine/servlet/ServletRequestImpl.java
(original)
+++ portals/jetspeed-2/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/engine/servlet/ServletRequestImpl.java
Mon Oct 22 04:57:40 2007
@@ -40,7 +40,6 @@
 import org.apache.jetspeed.Jetspeed;
 import org.apache.jetspeed.PortalReservedParameters;
 import org.apache.jetspeed.aggregator.CurrentWorkerContext;
-import org.apache.jetspeed.aggregator.Worker;
 import org.apache.jetspeed.container.PortletDispatcherIncludeAware;
 import org.apache.jetspeed.container.namespace.JetspeedNamespaceMapper;
 import org.apache.jetspeed.container.namespace.JetspeedNamespaceMapperFactory;
@@ -414,9 +413,8 @@
         Enumeration attrNames = super.getAttributeNames();
         
         // In parallel mode, adjust attributes by the values of the current thread
-        Thread ct = Thread.currentThread();
 
-        if (ct instanceof Worker || CurrentWorkerContext.getCurrentWorkerContextUsed())
+        if (CurrentWorkerContext.getParallelRenderingMode())
         {
             // If cached attributes map is null, it should be re-created.
             
@@ -460,9 +458,7 @@
 
         // In parallel mode, first look up from the worker.
 
-        Thread ct = Thread.currentThread();
-
-        if (ct instanceof Worker || CurrentWorkerContext.getCurrentWorkerContextUsed())
+        if (CurrentWorkerContext.getParallelRenderingMode())
         {            
             value = CurrentWorkerContext.getAttribute(name);
 
@@ -632,10 +628,7 @@
         
         // In parallel mode, put attribute into worker.
 
-        Thread ct = Thread.currentThread();
-        boolean currentWorkerContextUsed = CurrentWorkerContext.getCurrentWorkerContextUsed();
-
-        if (ct instanceof Worker || currentWorkerContextUsed) 
+        if (CurrentWorkerContext.getParallelRenderingMode()) 
         {
             // when it is parallel rendering, the cached request attributes should be re-created
later by setting it to null.
             cachedAttributes = null;
@@ -649,7 +642,7 @@
                 CurrentWorkerContext.setAttribute(name, value);
             }
 
-            if (currentWorkerContextUsed || name.startsWith("org.apache.jetspeed"))
+            if (name.startsWith("org.apache.jetspeed"))
             {
                 setAttributeInternal(name, value);
             }
@@ -698,9 +691,7 @@
         
         // In parallel mode, remove attribute from worker.
 
-        Thread ct = Thread.currentThread();
-
-        if (ct instanceof Worker || CurrentWorkerContext.getCurrentWorkerContextUsed()) 
+        if (CurrentWorkerContext.getParallelRenderingMode()) 
         {
             // when it is parallel rendering, the cached request attributes should be re-created
later by setting it to null.
             cachedAttributes = null;

Modified: portals/jetspeed-2/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/request/JetspeedRequestContextComponent.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/request/JetspeedRequestContextComponent.java?rev=587066&r1=587065&r2=587066&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/request/JetspeedRequestContextComponent.java
(original)
+++ portals/jetspeed-2/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/request/JetspeedRequestContextComponent.java
Mon Oct 22 04:57:40 2007
@@ -28,7 +28,6 @@
 import org.apache.commons.logging.LogFactory;
 import org.apache.jetspeed.PortalReservedParameters;
 import org.apache.jetspeed.aggregator.CurrentWorkerContext;
-import org.apache.jetspeed.aggregator.Worker;
 import org.apache.jetspeed.userinfo.UserInfoManager;
 
 /**
@@ -132,8 +131,7 @@
     {
         RequestContext rc = null;
 
-        Thread ct = Thread.currentThread();
-        if (ct instanceof Worker || CurrentWorkerContext.getCurrentWorkerContextUsed())
+        if (CurrentWorkerContext.getParallelRenderingMode())
         {
             rc = (RequestContext) CurrentWorkerContext.getAttribute(PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE);
         }

Modified: portals/jetspeed-2/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/aggregator/WorkerMonitor.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/aggregator/WorkerMonitor.java?rev=587066&r1=587065&r2=587066&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/aggregator/WorkerMonitor.java
(original)
+++ portals/jetspeed-2/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/aggregator/WorkerMonitor.java
Mon Oct 22 04:57:40 2007
@@ -60,10 +60,6 @@
      */
     int getRunningJobsCount();
     
-    void setQueue(Queue queue);
-    
-    Worker getWorker();
-    
     /** 
      * Start processing a job, assign it to a worker thread.
      * 
@@ -71,10 +67,4 @@
      */
     void process(RenderingJob job);
     
-    /**
-     * Release a job on completion
-     * 
-     * @param worker
-     */
-    void release(Worker worker);
 }

Modified: portals/jetspeed-2/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/container/session/PortalSessionMonitor.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/container/session/PortalSessionMonitor.java?rev=587066&r1=587065&r2=587066&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/container/session/PortalSessionMonitor.java
(original)
+++ portals/jetspeed-2/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/container/session/PortalSessionMonitor.java
Mon Oct 22 04:57:40 2007
@@ -18,6 +18,7 @@
 
 import java.io.Serializable;
 
+import javax.servlet.http.HttpSession;
 import javax.servlet.http.HttpSessionActivationListener;
 import javax.servlet.http.HttpSessionBindingListener;
 
@@ -34,4 +35,5 @@
     long getSessionKey();
     String getSessionId();
     void invalidateSession();
+    HttpSession getSession();
 }

Modified: portals/jetspeed-2/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/container/session/PortletApplicationSessionMonitor.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/container/session/PortletApplicationSessionMonitor.java?rev=587066&r1=587065&r2=587066&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/container/session/PortletApplicationSessionMonitor.java
(original)
+++ portals/jetspeed-2/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/container/session/PortletApplicationSessionMonitor.java
Mon Oct 22 04:57:40 2007
@@ -18,6 +18,7 @@
 
 import java.io.Serializable;
 
+import javax.servlet.http.HttpSession;
 import javax.servlet.http.HttpSessionActivationListener;
 import javax.servlet.http.HttpSessionBindingListener;
 
@@ -34,4 +35,5 @@
     String getPortalSessionId();
     String getContextPath();
     void invalidateSession();
+    HttpSession getSession();
 }

Modified: portals/jetspeed-2/trunk/jetspeed-commons/src/main/java/org/apache/jetspeed/aggregator/CurrentWorkerContext.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/jetspeed-commons/src/main/java/org/apache/jetspeed/aggregator/CurrentWorkerContext.java?rev=587066&r1=587065&r2=587066&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/jetspeed-commons/src/main/java/org/apache/jetspeed/aggregator/CurrentWorkerContext.java
(original)
+++ portals/jetspeed-2/trunk/jetspeed-commons/src/main/java/org/apache/jetspeed/aggregator/CurrentWorkerContext.java
Mon Oct 22 04:57:40 2007
@@ -34,7 +34,7 @@
             }
         };
     
-    private static ThreadLocal currentWorkerContextUsed =
+    private static ThreadLocal parallelRenderingMode =
         new ThreadLocal() {
             protected synchronized Object initialValue() {
                 return new boolean [] { false };
@@ -96,13 +96,13 @@
         ((Hashtable) currentWorkerContext.get()).clear();
     }
     
-    public static void setCurrentWorkerContextUsed(boolean used)
+    public static void setParallelRenderingMode(boolean parallelMode)
     {
-        ((boolean []) currentWorkerContextUsed.get())[0] = used;
+        ((boolean []) parallelRenderingMode.get())[0] = parallelMode;
     }
 
-    public static boolean getCurrentWorkerContextUsed()
+    public static boolean getParallelRenderingMode()
     {
-        return ((boolean []) currentWorkerContextUsed.get())[0];
+        return ((boolean []) parallelRenderingMode.get())[0];
     }
 }

Modified: portals/jetspeed-2/trunk/jetspeed-commons/src/main/java/org/apache/jetspeed/container/JetspeedContainerServlet.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/jetspeed-commons/src/main/java/org/apache/jetspeed/container/JetspeedContainerServlet.java?rev=587066&r1=587065&r2=587066&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/jetspeed-commons/src/main/java/org/apache/jetspeed/container/JetspeedContainerServlet.java
(original)
+++ portals/jetspeed-2/trunk/jetspeed-commons/src/main/java/org/apache/jetspeed/container/JetspeedContainerServlet.java
Mon Oct 22 04:57:40 2007
@@ -45,7 +45,6 @@
 import org.apache.jetspeed.services.PortletServices;
 import org.apache.jetspeed.tools.pamanager.PortletApplicationManagement;
 import org.apache.jetspeed.util.DirectoryHelper;
-import org.apache.jetspeed.aggregator.Worker;
 import org.apache.jetspeed.aggregator.CurrentWorkerContext;
 
 /**
@@ -210,7 +209,7 @@
         
         try
         {
-            isParallelMode = (Thread.currentThread() instanceof Worker || CurrentWorkerContext.getCurrentWorkerContextUsed());
+            isParallelMode = CurrentWorkerContext.getParallelRenderingMode();
 
             if (isParallelMode)
             {

Modified: portals/jetspeed-2/trunk/jetspeed-commons/src/main/java/org/apache/jetspeed/container/session/PortletApplicationSessionMonitorImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/jetspeed-commons/src/main/java/org/apache/jetspeed/container/session/PortletApplicationSessionMonitorImpl.java?rev=587066&r1=587065&r2=587066&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/jetspeed-commons/src/main/java/org/apache/jetspeed/container/session/PortletApplicationSessionMonitorImpl.java
(original)
+++ portals/jetspeed-2/trunk/jetspeed-commons/src/main/java/org/apache/jetspeed/container/session/PortletApplicationSessionMonitorImpl.java
Mon Oct 22 04:57:40 2007
@@ -70,6 +70,11 @@
         return portalSessionId;
     }
     
+    public HttpSession getSession()
+    {
+        return session;
+    }
+    
     /* (non-Javadoc)
      * @see org.apache.jetspeed.container.session.PortletApplicationSessionMonitor#getContextPath()
      */

Modified: portals/jetspeed-2/trunk/jetspeed-portal-resources/src/main/resources/webapp/WEB-INF/assembly/aggregation.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/jetspeed-portal-resources/src/main/resources/webapp/WEB-INF/assembly/aggregation.xml?rev=587066&r1=587065&r2=587066&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/jetspeed-portal-resources/src/main/resources/webapp/WEB-INF/assembly/aggregation.xml
(original)
+++ portals/jetspeed-2/trunk/jetspeed-portal-resources/src/main/resources/webapp/WEB-INF/assembly/aggregation.xml
Mon Oct 22 04:57:40 2007
@@ -1,11 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
 <!--
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements.  See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
     the License.  You may obtain a copy of the License at
     
     http://www.apache.org/licenses/LICENSE-2.0
@@ -134,6 +134,7 @@
         </constructor-arg>
     </bean>
     
+    <!-- The default Worker Monitor -->
     <bean id="org.apache.jetspeed.aggregator.WorkerMonitor"
           class="org.apache.jetspeed.aggregator.impl.WorkerMonitorImpl"
           init-method="start"  destroy-method="stop" >
@@ -156,6 +157,29 @@
         </constructor-arg>          
           
     </bean>
+    
+    <!--
+    Commonj Work Manager and Worker Monitor
+    
+    If you want to use Commonj Work Manager provided by the container, uncomment the followings
+    and replace 'org.apache.jetspeed.aggregator.WorkerMonitor' with 'org.apache.jetspeed.aggregator.CommonjWorkerMonitor'
in this file.
+    -->
+    
+    <!--
+    <bean id="JetspeedWorkManager" class="org.springframework.jndi.JndiObjectFactoryBean">
+        <property name="resourceRef"><value>false</value></property>

+        <property name="jndiName">
+            <value>java:comp/env/wm/jetspeed</value>
+        </property>
+    </bean>
+    <bean id="org.apache.jetspeed.aggregator.CommonjWorkerMonitor"
+          class="org.apache.jetspeed.aggregator.impl.CommonjWorkerMonitorImpl"
+          init-method="start"  destroy-method="stop" >
+        <constructor-arg index="0">
+            <ref bean="JetspeedWorkManager" />           
+        </constructor-arg>
+    </bean>
+    -->
 
     <bean id="HeaderAggregatorPortal" class="org.apache.jetspeed.aggregator.impl.HeaderAggregatorImpl">
         <constructor-arg index="0">

Modified: portals/jetspeed-2/trunk/jetspeed-portal-resources/src/main/resources/webapp/WEB-INF/assembly/pluto-factories.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/jetspeed-portal-resources/src/main/resources/webapp/WEB-INF/assembly/pluto-factories.xml?rev=587066&r1=587065&r2=587066&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/jetspeed-portal-resources/src/main/resources/webapp/WEB-INF/assembly/pluto-factories.xml
(original)
+++ portals/jetspeed-2/trunk/jetspeed-portal-resources/src/main/resources/webapp/WEB-INF/assembly/pluto-factories.xml
Mon Oct 22 04:57:40 2007
@@ -28,8 +28,12 @@
   />   
           
   <bean id="ServletPortletInvokerFactory"
-        class="org.apache.jetspeed.container.invoker.ServletPortletInvokerFactory" 
-  /> 	
+        class="org.apache.jetspeed.container.invoker.ServletPortletInvokerFactory">
+    <!-- Set the following argument to true when you are running the system with parallel
rendering mode under WebSphere. -->
+    <constructor-arg index="0">
+        <value>false</value>
+    </constructor-arg>
+  </bean>
 	
   <bean id="javax.portlet.ActionRequest"
         class="org.apache.jetspeed.components.factorybeans.PlutoFactoryFactoryBean"

Modified: portals/jetspeed-2/trunk/jetspeed-portal-resources/src/main/resources/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/jetspeed-portal-resources/src/main/resources/webapp/WEB-INF/web.xml?rev=587066&r1=587065&r2=587066&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/jetspeed-portal-resources/src/main/resources/webapp/WEB-INF/web.xml
(original)
+++ portals/jetspeed-2/trunk/jetspeed-portal-resources/src/main/resources/webapp/WEB-INF/web.xml
Mon Oct 22 04:57:40 2007
@@ -45,6 +45,13 @@
           <param-value>48</param-value>
       </init-param>
   </filter>
+  
+  <!--
+  <filter>
+    <filter-name>PortalFilter</filter-name>
+    <filter-class>org.apache.jetspeed.login.filter.PortalFilter</filter-class>
  
+  </filter>
+  -->
 
   <filter-mapping>
     <filter-name>XXSUrlAttackFilter</filter-name>
@@ -56,14 +63,7 @@
       <servlet-name>default</servlet-name>
   </filter-mapping>
   
-  <!--
-  <filter>
-    <filter-name>PortalFilter</filter-name>
-    <filter-class>org.apache.jetspeed.login.filter.PortalFilter</filter-class>
  
-  </filter>
-  -->
 <!--      
-    
   <filter-mapping>
     <filter-name>PortalFilter</filter-name>
     <url-pattern>/*</url-pattern>    
@@ -286,6 +286,20 @@
       <res-type>javax.sql.DataSource</res-type>
       <res-auth>Container</res-auth>
   </resource-ref>
+  
+  <!-- JNDI CommonJ WorkManager resource -->
+  <!--
+  If you want to use Commonj Work Manager provided by the container in parallel rendering,
uncomment the following.
+  -->
+  <!--
+  <resource-ref>
+    <description>WorkManager</description>
+    <res-ref-name>wm/jetspeed</res-ref-name>
+    <res-type>commonj.work.WorkManager</res-type>
+    <res-auth>Container</res-auth>
+    <res-sharing-scope>Shareable</res-sharing-scope>
+  </resource-ref>
+  -->
 
   <!-- Protect LogInRedirectory.jsp.  This will require a login when called -->
   <security-constraint>

Modified: portals/jetspeed-2/trunk/pom.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/pom.xml?rev=587066&r1=587065&r2=587066&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/pom.xml (original)
+++ portals/jetspeed-2/trunk/pom.xml Mon Oct 22 04:57:40 2007
@@ -313,6 +313,8 @@
     <xalan.version>2.4.1</xalan.version>
     <xerces.version>2.3.0</xerces.version>
     <xml-apis.version>1.0.b2</xml-apis.version>
+    <asm.version>2.2</asm.version>
+    <commonj.version>1.1</commonj.version>
   </properties>
 
   <!-- Dependency Configuration -->
@@ -1003,7 +1005,27 @@
         <artifactId>ant</artifactId>
         <version>${ant.version}</version>
       </dependency>
+      
+      <!-- ASM -->
+      <dependency>
+        <groupId>asm</groupId>
+        <artifactId>asm</artifactId>
+        <version>${asm.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>asm</groupId>
+        <artifactId>asm-attrs</artifactId>
+        <version>${asm.version}</version>
+      </dependency>
 
+      <!-- CommonJ -->
+      <dependency>
+        <groupId>commonj</groupId>
+        <artifactId>commonj-twm</artifactId>
+        <version>${commonj.version}</version>
+        <scope>provided</scope>
+      </dependency>
+      
     </dependencies>
   </dependencyManagement>
 



---------------------------------------------------------------------
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