portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r758134 [1/5] - in /portals/jetspeed-2/portal/trunk: applications/jetspeed/src/main/webapp/WEB-INF/templates/layout/html/solo/ applications/jetspeed/src/main/webapp/decorations/layout/blueocean/ applications/jetspeed/src/main/webapp/decorat...
Date Wed, 25 Mar 2009 03:25:00 GMT
Author: ate
Date: Wed Mar 25 03:24:47 2009
New Revision: 758134

URL: http://svn.apache.org/viewvc?rev=758134&view=rev
Log:
One big *initial* commit for primarily JS2-938: Create flyweight PortletWindow instances for each request, the handle to access and store all portlet interaction data and drop the PortletEntityImpl usage
See: http://issues.apache.org/jira/browse/JS2-938

WARNING: this commit (together with the shortly following second commit, see further below)

    will *NOT* bring the trunk back in runnable status yet

but at least it will be compilable again.

I have done zero testing yet and for one the Spring assembly definitely isn't completely updated yet.
And, as an initial commit, there WILL be coding errors and oversights for sure, so all please help out reviewing and fixing as much as possible. 

This big bang commit delivers the following changes:
- all Window cache handling has been removed, just as the WindowAccessor usage
- For Thread managment and synchronization, now only two thread locals are used:
  - one to keep reference to the main (portal) request RequestContext
  - one for each render job thread PortletWindow
- All PortletWindow related state, including the attributes are now stored and managed only through the PortletWindow
- The CommonWorkerContext and all related conditional parallel rendering logic has now been removed (as being no longer needed)
- PortletWindow now also implements *pluto* PortletEntity but that is a candidate for removal also IMO (I've added a String getEntityId() method on PortletWindow just in case)
- PortletEntityImpl and its Broker are still there but nowhere used anymore except in the JetspeedSerializer and through the Ajax API (needs separate cleaning up) 
 
And, also, some further wiring of the Pluto container, specifically the PortletRequest/Response*Context implementations for JS2-871
See: http://issues.apache.org/jira/browse/JS2-871

Finally, a second commit will follow shortly (which also will bring the current trunk back to compilable status),
concerning JS2-939: Portlet URL/Navigation State JSR-286 Portlet API 2.0 Support, and specifically the public render parameter handling.
I've split off that part of my commit to allow easier review by Randy so that those changes don't get "lost" in this big bang commit...
 

Added:
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/container/state/MockContentFragment.java   (with props)
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/container/state/MockContentPage.java   (with props)
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/container/state/MockRequestContext.java   (with props)
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/window/MockPortletWindow.java   (with props)
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/container/FilterManager.java   (with props)
Removed:
    portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/main/java/org/apache/jetspeed/cache/impl/EhPortletWindowCache.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/test/java/org/apache/jetspeed/cache/TestPortletWindowCache.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/invoker/PortletWindowRequestContextImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/window/impl/
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/engine/servlet/ServletRequestFactoryImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/engine/servlet/ServletRequestImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/engine/servlet/ServletResponseFactoryImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/HashMapWindowCache.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/window/TestWindows.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/cache/PortletWindowCache.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/container/PortletWindowRequestContext.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/container/window/PortletWindowAccessor.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/engine/servlet/
    portals/jetspeed-2/portal/trunk/jetspeed-commons/src/main/java/org/apache/jetspeed/aggregator/
Modified:
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/templates/layout/html/solo/layout.jsp
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/templates/layout/html/solo/layout.vm
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/blueocean/header.vm
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/jetspeed/header.vm
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/jscookmenu/header.vm
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/sunflower/header.vm
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/thesolution/header.vm
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/tigris/header.vm
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/portlet/decorator.jsp
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/portlet/decorator.vm
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/portlet/metal/decorator.vm
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/portlet/minty-blue/decorator.vm
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/portlet/simple/xhtml-basic/decorator.vm
    portals/jetspeed-2/portal/trunk/components/jetspeed-layout-portlets/src/main/java/org/apache/jetspeed/portlets/layout/LayoutPortlet.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-layout-portlets/src/main/java/org/apache/jetspeed/portlets/layout/MultiColumnPortlet.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/AsyncPageAggregatorImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/ContentDispatcherImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/HeaderAggregatorImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/PageAggregatorImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/PortletHeaderRequestImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/PortletRendererImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/PortletTrackingManagerImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/RenderingJobImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/ContainerValve.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/JetspeedPortletContainerWrapper.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletRenderResponseContextImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletResponseContextImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/invoker/DefaultPortletRequestResponseUnwrapper.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/invoker/JetspeedPortletInvoker.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/invoker/JetspeedPortletInvokerService.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/invoker/LocalPortletInvoker.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/invoker/ServletPortletInvoker.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/services/JetspeedFilterManager.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/services/JetspeedFilterManagerService.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/url/impl/DesktopEncodingPortalURL.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/decoration/DecorationValve.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/engine/JetspeedServlet.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/events/EventCoordinationServiceImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/ChangePortletAction.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/UpdatePageAction.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/LoginServlet.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/pipeline/valve/impl/ActionValveImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/request/JetspeedRequestContext.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/request/JetspeedRequestContextComponent.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/resource/ResourceValveImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/title/DynamicTitleServiceImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/tools/pamanager/PortletApplicationManager.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/tools/pamanager/VersionedPortletApplicationManager.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/AbstractUserInfoManagerImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/velocity/JetspeedPowerToolImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/AbstractPortalContainerTestCase.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/aggregator/TestRenderer.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/aggregator/TestWorkerMonitor.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/container/state/TestNavigationalState.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/deployment/TestSimpleDeployment.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/engine/TestSpringEngine.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/testdata/deploy/jetspeed-portlet.xml
    portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletentity/PersistenceBrokerPortletEntityAccess.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletentity/PortletEntityImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletpreferences/PortletPreferencesServiceImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/util/RegistrySupportedTestCase.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/window/impl/PortletWindowImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/request/MockRequestContextComponent.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/aggregator/ContentDispatcherCtrl.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/aggregator/PortletRenderer.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/container/PortletWindow.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/container/url/PortalURL.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/layout/JetspeedPowerTool.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/mockobjects/request/MockRequestContext.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/request/RequestContext.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/request/RequestContextComponent.java
    portals/jetspeed-2/portal/trunk/jetspeed-commons/src/main/java/org/apache/jetspeed/container/JetspeedContainerServlet.java
    portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/aggregation.xml
    portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/ajax-layout.xml
    portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/alternate/versioned-deployment/deployment.xml
    portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/alternate/versioned-deployment/jetspeed-services.xml
    portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/deployment.xml
    portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/jetspeed-services.xml
    portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/jetspeed-spring.xml
    portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/pipelines.xml
    portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/pluto-services.xml
    portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/portal-url-generation.xml

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/templates/layout/html/solo/layout.jsp
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/templates/layout/html/solo/layout.jsp?rev=758134&r1=758133&r2=758134&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/templates/layout/html/solo/layout.jsp (original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/templates/layout/html/solo/layout.jsp Wed Mar 25 03:24:47 2009
@@ -30,7 +30,7 @@
       pageContext.setAttribute("frag", maxFragment, PAGE_SCOPE);
       
       //title
-      String title = _jpt.getTitle(_jpt.getCurrentPortletEntity(),maxFragment);
+      String title = _jpt.getTitle(maxFragment);
       if (null == title)
         title = "";
       pageContext.setAttribute("title",title, PAGE_SCOPE);

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/templates/layout/html/solo/layout.vm
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/templates/layout/html/solo/layout.vm?rev=758134&r1=758133&r2=758134&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/templates/layout/html/solo/layout.vm (original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/templates/layout/html/solo/layout.vm Wed Mar 25 03:24:47 2009
@@ -37,7 +37,7 @@
 	
     #includeHeaderResource()
 
-    <title>$!jetspeed.getTitle($jetspeed.getCurrentPortletEntity(), $f)</title>
+    <title>$!jetspeed.getTitle($f)</title>
 
     <meta name="keywords" content="" />
     <meta name="description" content="#PageDescription()" />

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/blueocean/header.vm
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/blueocean/header.vm?rev=758134&r1=758133&r2=758134&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/blueocean/header.vm (original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/blueocean/header.vm Wed Mar 25 03:24:47 2009
@@ -124,7 +124,7 @@
         &nbsp;
 #end
      <!-- Page Action Bar -->
-##    <span style="position:absolute;right:5em">$jetspeed.renderPortletEntity("theClock", "j2-admin::DateTimePortlet")</span>
+##    <span style="position:absolute;right:5em">$jetspeed.renderPortletWindow("theClock", "j2-admin::DateTimePortlet")</span>
 #if($portalFilter)
 <span style="position:absolute;right:5em"></span>   
 #else

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/jetspeed/header.vm
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/jetspeed/header.vm?rev=758134&r1=758133&r2=758134&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/jetspeed/header.vm (original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/jetspeed/header.vm Wed Mar 25 03:24:47 2009
@@ -57,7 +57,7 @@
 </p>
   <p>
   #includeTabsNavigation($site.siblingPages)
-## <span style="position:absolute;right:5em">$jetspeed.renderPortletEntity("theClock", "j2-admin::DateTimePortlet")</span>  
+## <span style="position:absolute;right:5em">$jetspeed.renderPortletWindow("theClock", "j2-admin::DateTimePortlet")</span>  
 #if ($request.getUserPrincipal())
 <span style="position:absolute;right:5em"><a href="#BaseHref()login/logout">Logout</a></span>   
 #end 

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/jscookmenu/header.vm
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/jscookmenu/header.vm?rev=758134&r1=758133&r2=758134&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/jscookmenu/header.vm (original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/jscookmenu/header.vm Wed Mar 25 03:24:47 2009
@@ -112,7 +112,7 @@
       <div id="breadcrumbs">
 #if(!$breadcrumbsStandardMenu.empty)
 #includeLinksNavigation($breadcrumbsStandardMenu $LEFT_TO_RIGHT "" $BREADCRUMBS_STYLE "")
-## <span style="position:absolute;right:5em">$jetspeed.renderPortletEntity("theClock", "j2-admin::DateTimePortlet")</span>
+## <span style="position:absolute;right:5em">$jetspeed.renderPortletWindow("theClock", "j2-admin::DateTimePortlet")</span>
 #if ($request.getUserPrincipal())
 <span style="position:absolute;right:5em"><a href="#BaseHref()login/logout">Logout</a></span>   
 #end 

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/sunflower/header.vm
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/sunflower/header.vm?rev=758134&r1=758133&r2=758134&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/sunflower/header.vm (original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/sunflower/header.vm Wed Mar 25 03:24:47 2009
@@ -79,7 +79,7 @@
         &nbsp;
 #end
      <!-- Page Action Bar -->
-##    <span style="position:absolute;right:5em">$jetspeed.renderPortletEntity("theClock", "j2-admin::DateTimePortlet")</span>     
+##    <span style="position:absolute;right:5em">$jetspeed.renderPortletWindow("theClock", "j2-admin::DateTimePortlet")</span>     
 #if ($request.getUserPrincipal())
 <span style="position:absolute;right:5em"><a href="#BaseHref()login/logout">Logout</a></span>   
 #end 

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/thesolution/header.vm
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/thesolution/header.vm?rev=758134&r1=758133&r2=758134&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/thesolution/header.vm (original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/thesolution/header.vm Wed Mar 25 03:24:47 2009
@@ -83,7 +83,7 @@
             <div id="corecenter">
 
      <!-- Page Action Bar -->
-##   <span style="position:absolute;right:5em">$jetspeed.renderPortletEntity("theClock", "j2-admin::DateTimePortlet")</span>     
+##   <span style="position:absolute;right:5em">$jetspeed.renderPortletWindow("theClock", "j2-admin::DateTimePortlet")</span>     
 #if ($request.getUserPrincipal())
 <span style="position:absolute;right:15em"><a href="#BaseHref()login/logout">Logout</a></span>   
 #end 

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/tigris/header.vm
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/tigris/header.vm?rev=758134&r1=758133&r2=758134&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/tigris/header.vm (original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/tigris/header.vm Wed Mar 25 03:24:47 2009
@@ -88,7 +88,7 @@
         &nbsp;
 #end
      <!-- Page Action Bar -->
-##    <span style="position:absolute;right:5em">$jetspeed.renderPortletEntity("theClock", "j2-admin::DateTimePortlet")</span>   
+##    <span style="position:absolute;right:5em">$jetspeed.renderPortletWindow("theClock", "j2-admin::DateTimePortlet")</span>   
 #if ($request.getUserPrincipal())
 <span style="position:absolute;right:5em"><a href="#BaseHref()login/logout">Logout</a></span>   
 #end 

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/portlet/decorator.jsp
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/portlet/decorator.jsp?rev=758134&r1=758133&r2=758134&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/portlet/decorator.jsp (original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/portlet/decorator.jsp Wed Mar 25 03:24:47 2009
@@ -35,7 +35,7 @@
       WindowState _ws = _jpt.getMappedWindowState();
       pageContext.setAttribute("ws", _ws, DEFAULT_SCOPE);
   
-      String _pTitle = _jpt.getTitle(_jpt.getCurrentPortletEntity(), _jpt.getCurrentFragment());
+      String _pTitle = _jpt.getTitle();
       pageContext.setAttribute("pTitle", _pTitle, DEFAULT_SCOPE);
       
       pageContext.setAttribute("isMinimized",_ws.toString().equalsIgnoreCase("minimized"), DEFAULT_SCOPE);

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/portlet/decorator.vm
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/portlet/decorator.vm?rev=758134&r1=758133&r2=758134&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/portlet/decorator.vm (original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/portlet/decorator.vm Wed Mar 25 03:24:47 2009
@@ -35,7 +35,7 @@
       <div class="PTitleContent">	
         #set ($ws=$jetspeed.MappedWindowState)
         
-        $!jetspeed.getTitle($jetspeed.getCurrentPortletEntity(), $f)
+        $!jetspeed.getTitle($f)
       </div>
     
       #PortletActionBar($decoration)

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/portlet/metal/decorator.vm
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/portlet/metal/decorator.vm?rev=758134&r1=758133&r2=758134&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/portlet/metal/decorator.vm (original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/portlet/metal/decorator.vm Wed Mar 25 03:24:47 2009
@@ -32,7 +32,7 @@
     <td class="PTitleLeft" style="font-size:1pt;" nowrap="true">&nbsp;</td>
 
     <td align="left" valign="middle" class="PTitle" >
-       $!jetspeed.getTitle($jetspeed.getPortletEntity($f), $f)
+       $!jetspeed.getTitle($f)
     </td>
     <td align="right" valign="middle" class="PTitle" >
       <table border="0" cellpadding="0" cellspacing="0" >

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/portlet/minty-blue/decorator.vm
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/portlet/minty-blue/decorator.vm?rev=758134&r1=758133&r2=758134&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/portlet/minty-blue/decorator.vm (original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/portlet/minty-blue/decorator.vm Wed Mar 25 03:24:47 2009
@@ -31,7 +31,7 @@
     <td class="PTitleLeft" style="font-size:1pt;" nowrap="true">&nbsp;</td>
 
     <td align="left" valign="middle" class="PTitle" >
-       $!jetspeed.getTitle($jetspeed.getPortletEntity($f), $f)
+       $!jetspeed.getTitle($f)
     </td>
     <td align="right" valign="middle" class="PTitle" >
       <table border="0" cellpadding="0" cellspacing="0" >

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/portlet/simple/xhtml-basic/decorator.vm
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/portlet/simple/xhtml-basic/decorator.vm?rev=758134&r1=758133&r2=758134&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/portlet/simple/xhtml-basic/decorator.vm (original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/portlet/simple/xhtml-basic/decorator.vm Wed Mar 25 03:24:47 2009
@@ -14,14 +14,13 @@
 ## limitations under the License.
 #set($myPage = $jetspeed.page)
 #set($myF = $jetspeed.currentFragment)
-#set($myPE = $jetspeed.currentPortletEntity)
 #set($actions = $myF.decoration.actions)
 ## Begin portlet/html/simple/decorator.vm
 <div id="${myF.id}" class="portlet-simple">
 ##
 ## Portlet Title Bar
 ##
-<div class="PTitleContent">$!jetspeed.getTitle($myPE, $myF)
+<div class="PTitleContent">$!jetspeed.getTitle($myF)
 #foreach ($action in $actions)
 <a href="${action.Action}" title="${action.Name}"><img src="${action.Link}" alt="${action.Alt}" class="noborder"/></a>
 #end

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-layout-portlets/src/main/java/org/apache/jetspeed/portlets/layout/LayoutPortlet.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-layout-portlets/src/main/java/org/apache/jetspeed/portlets/layout/LayoutPortlet.java?rev=758134&r1=758133&r2=758134&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-layout-portlets/src/main/java/org/apache/jetspeed/portlets/layout/LayoutPortlet.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-layout-portlets/src/main/java/org/apache/jetspeed/portlets/layout/LayoutPortlet.java Wed Mar 25 03:24:47 2009
@@ -40,9 +40,7 @@
 import org.apache.jetspeed.PortalReservedParameters;
 import org.apache.jetspeed.administration.PortalConfiguration;
 import org.apache.jetspeed.capabilities.CapabilityMap;
-import org.apache.jetspeed.components.portletentity.PortletEntityAccessComponent;
 import org.apache.jetspeed.components.portletregistry.PortletRegistry;
-import org.apache.jetspeed.container.window.PortletWindowAccessor;
 import org.apache.jetspeed.layout.JetspeedPowerTool;
 import org.apache.jetspeed.locator.LocatorDescriptor;
 import org.apache.jetspeed.locator.TemplateDescriptor;
@@ -83,8 +81,6 @@
     protected PageManager pageManager;
     protected JetspeedPowerToolFactory jptFactory;
     protected TemplateLocator templateLocator;
-    protected PortletEntityAccessComponent entityAccess;
-    protected PortletWindowAccessor windowAccess;
     protected TemplateLocator decorationLocator;
     protected boolean storeViewPageInSession;
     
@@ -114,18 +110,6 @@
             throw new PortletException("Failed to find the JPT Factory on portlet initialization");
         }        
         
-        entityAccess = (PortletEntityAccessComponent) getPortletContext().getAttribute(CommonPortletServices.CPS_ENTITY_ACCESS_COMPONENT);
-        if (null == entityAccess)
-        {
-            throw new PortletException("Failed to find the Entity Access on portlet initialization");
-        }        
-        
-        windowAccess = (PortletWindowAccessor) getPortletContext().getAttribute(CommonPortletServices.CPS_WINDOW_ACCESS_COMPONENT);
-        if (null == windowAccess)
-        {
-            throw new PortletException("Failed to find the Window Access on portlet initialization");
-        }        
-
         PortalConfiguration portalConfiguration = (PortalConfiguration) getPortletContext().getAttribute(CommonPortletServices.CPS_PORTAL_CONFIGURATION);
         if (null == portalConfiguration)
         {
@@ -315,7 +299,6 @@
         }
         super.doView(request, response);
 
-        request.removeAttribute(PortalReservedParameters.PAGE_ATTRIBUTE);
         request.removeAttribute("fragment");
         request.removeAttribute("layout");
         request.removeAttribute("dispatcher");

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-layout-portlets/src/main/java/org/apache/jetspeed/portlets/layout/MultiColumnPortlet.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-layout-portlets/src/main/java/org/apache/jetspeed/portlets/layout/MultiColumnPortlet.java?rev=758134&r1=758133&r2=758134&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-layout-portlets/src/main/java/org/apache/jetspeed/portlets/layout/MultiColumnPortlet.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-layout-portlets/src/main/java/org/apache/jetspeed/portlets/layout/MultiColumnPortlet.java Wed Mar 25 03:24:47 2009
@@ -266,9 +266,6 @@
                             // layout portlet change
                             targetFragment.setName(layout);
                             pageManager.updatePage(requestPage);
-                            entityAccess.updatePortletEntity(window.getPortletEntity(), targetFragment);
-                            entityAccess.storePortletEntity(window.getPortletEntity());
-                            windowAccess.createPortletWindow(window.getPortletEntity(), targetFragment.getId());
                             clearLayoutAttributes(request);
                             return;
                         }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/AsyncPageAggregatorImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/AsyncPageAggregatorImpl.java?rev=758134&r1=758133&r2=758134&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/AsyncPageAggregatorImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/AsyncPageAggregatorImpl.java Wed Mar 25 03:24:47 2009
@@ -28,7 +28,6 @@
 import org.apache.jetspeed.aggregator.PageAggregator;
 import org.apache.jetspeed.aggregator.PortletRenderer;
 import org.apache.jetspeed.aggregator.RenderingJob;
-import org.apache.jetspeed.aggregator.CurrentWorkerContext;
 import org.apache.jetspeed.aggregator.impl.BaseAggregatorImpl;
 import org.apache.jetspeed.container.state.NavigationalState;
 import org.apache.jetspeed.exception.JetspeedException;
@@ -62,8 +61,6 @@
 
     /**
      * Builds the portlet set defined in the context into a portlet tree.
-     * 
-     * @return Unique Portlet Entity ID
      */
     public void build( RequestContext context ) throws JetspeedException, IOException
     {
@@ -92,8 +89,8 @@
         context.getResponse().getWriter().write(root.getRenderedContent());
         if (null != window)
         {
-            context.getRequest().removeAttribute(PortalReservedParameters.MAXIMIZED_FRAGMENT_ATTRIBUTE);
-            context.getRequest().removeAttribute(PortalReservedParameters.MAXIMIZED_LAYOUT_ATTRIBUTE);
+            window.removeAttribute(PortalReservedParameters.MAXIMIZED_FRAGMENT_ATTRIBUTE);
+            window.removeAttribute(PortalReservedParameters.MAXIMIZED_LAYOUT_ATTRIBUTE);
         }
         releaseBuffers(root, context);                
     }
@@ -117,9 +114,8 @@
         ContentFragment maxedContentFragment = page.getContentFragmentById(window.getId().toString());
         if (maxedContentFragment != null)
         {
-            context.getRequest().setAttribute(PortalReservedParameters.MAXIMIZED_FRAGMENT_ATTRIBUTE, maxedContentFragment);
-            context.getRequest().setAttribute(PortalReservedParameters.FRAGMENT_ATTRIBUTE, maxedContentFragment);
-            context.getRequest().setAttribute(PortalReservedParameters.MAXIMIZED_LAYOUT_ATTRIBUTE, page.getRootContentFragment());
+            window.setAttribute(PortalReservedParameters.MAXIMIZED_FRAGMENT_ATTRIBUTE, maxedContentFragment);
+            window.setAttribute(PortalReservedParameters.MAXIMIZED_LAYOUT_ATTRIBUTE, page.getRootContentFragment());
             try
             {
                 renderer.renderNow(maxedContentFragment, context);
@@ -198,8 +194,6 @@
             log.info("Aggregating " + page.getPath() + ". Parallel: " + parallelJobCount + ", Sequential: " + sequentialJobCount);
         }
         
-        CurrentWorkerContext.setParallelRenderingMode(parallelJobCount > 0);
-
         // kick off the parallel rendering jobs
         Iterator iter = parallelJobs.iterator();
         while (iter.hasNext())
@@ -219,9 +213,6 @@
         // synchronize on completion of all jobs
         renderer.waitForRenderingJobs(parallelJobs);
         
-        // Now, restore it to non parallel mode for rendering layout portlets.
-        CurrentWorkerContext.setParallelRenderingMode(false);
-        
         // render layout fragments.
         iter = layoutFragments.iterator();
         while (iter.hasNext()) 

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/ContentDispatcherImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/ContentDispatcherImpl.java?rev=758134&r1=758133&r2=758134&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/ContentDispatcherImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/ContentDispatcherImpl.java Wed Mar 25 03:24:47 2009
@@ -16,13 +16,9 @@
  */
 package org.apache.jetspeed.aggregator.impl;
 
-import javax.servlet.http.HttpServletResponse;
-
 import org.apache.jetspeed.aggregator.ContentDispatcherCtrl;
 import org.apache.jetspeed.aggregator.PortletContent;
 import org.apache.jetspeed.om.page.Fragment;
-import org.apache.jetspeed.request.RequestContext;
-import org.apache.jetspeed.container.PortletWindow;
 
 /**
  * <p>
@@ -45,16 +41,6 @@
         this.content = content;
     }
 
-    public HttpServletResponse getResponseForWindow( PortletWindow window, RequestContext request )
-    {
-        return new HttpBufferedResponse(request.getResponse(), this.content.getWriter());
-    }
-    
-    public HttpServletResponse getResponseForFragment( Fragment fragment, RequestContext request )
-    {
-        return new HttpBufferedResponse(request.getResponse(), this.content.getWriter());
-    }
-
     /**
      * <p>
      * getPortletContent

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/HeaderAggregatorImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/HeaderAggregatorImpl.java?rev=758134&r1=758133&r2=758134&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/HeaderAggregatorImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/HeaderAggregatorImpl.java Wed Mar 25 03:24:47 2009
@@ -33,7 +33,6 @@
 import org.apache.jetspeed.aggregator.PageAggregator;
 import org.apache.jetspeed.container.state.NavigationalState;
 import org.apache.jetspeed.container.url.BasePortalURL;
-import org.apache.jetspeed.container.window.PortletWindowAccessor;
 import org.apache.jetspeed.decoration.DecorationFactory;
 import org.apache.jetspeed.exception.JetspeedException;
 import org.apache.jetspeed.factory.PortletFactory;
@@ -65,7 +64,6 @@
     protected final static String EOL = "\r\n";   // html eol
 
     private PortletFactory factory;
-    private PortletWindowAccessor windowAccessor;
     private HeaderResourceFactory headerResourceFactory;
     private DecorationFactory decorationFactory;
     
@@ -82,18 +80,16 @@
     
     
     public HeaderAggregatorImpl( PortletFactory factory,
-                                 PortletWindowAccessor windowAccessor,
                                  HeaderResourceFactory headerResourceFactory,
                                  boolean isDesktop,
                                  Map headerConfiguration,
                                  Map headerResourceRegistry,
                                  DecorationFactory decorationFactory )
     {
-        this( factory, windowAccessor, headerResourceFactory, isDesktop, headerConfiguration, headerResourceRegistry, decorationFactory, null );
+        this( factory, headerResourceFactory, isDesktop, headerConfiguration, headerResourceRegistry, decorationFactory, null );
     }
     
     public HeaderAggregatorImpl( PortletFactory factory,
-                                 PortletWindowAccessor windowAccessor,
                                  HeaderResourceFactory headerResourceFactory,
                                  boolean isDesktop,
                                  Map headerConfiguration,
@@ -102,7 +98,6 @@
                                  BasePortalURL baseUrlAccess )
     {
         this.factory = factory;
-        this.windowAccessor = windowAccessor;
         this.headerResourceFactory = headerResourceFactory;
         this.isDesktop = isDesktop;
         this.baseUrlAccess = baseUrlAccess;
@@ -1111,21 +1106,24 @@
         {
             if ( !fragment.getType().equals( ContentFragment.LAYOUT ) )
             {
-                PortletWindow portletWindow = getPortletWindowAccessor().getPortletWindow( fragment );
-                PortletDefinition pd = portletWindow.getPortletEntity().getPortletDefinition();
-                if ( pd != null && getPortletFactory().isPortletApplicationRegistered((PortletApplication)pd.getApplication() ) )
-                {
-                    String portletApplicationContextPath = pd.getApplication().getContextPath();
-                    Portlet portlet = getPortletFactory().getPortletInstance( context.getConfig().getServletContext().getContext( portletApplicationContextPath ), pd ).getRealPortlet();            
-                    if ( portlet != null && portlet instanceof SupportsHeaderPhase )
+                PortletWindow portletWindow = context.getPortletWindow( fragment );
+                if (portletWindow != null)
+                {
+                    PortletDefinition pd = portletWindow.getPortletDefinition();
+                    if ( getPortletFactory().isPortletApplicationRegistered((PortletApplication)pd.getApplication() ) )
                     {
-                        log.debug( "renderHeaderFragment: " + pd.getPortletName() + " supports header phase" );
-                        
-                        HeaderResource hr = getHeaderResourceFactory().getHeaderResource( context, this.baseUrlAccess, isDesktop(), getHeaderConfiguration() );
-                        PortletHeaderRequest headerRequest = new PortletHeaderRequestImpl( context, portletWindow, portletApplicationContextPath );
-                        PortletHeaderResponse headerResponse = new PortletHeaderResponseImpl( context, hr, isDesktop(), getHeaderConfiguration(), getHeaderResourceRegistry() );
-                        ((SupportsHeaderPhase)portlet).doHeader( headerRequest, headerResponse );
-                        return true;
+                        String portletApplicationContextPath = pd.getApplication().getContextPath();
+                        Portlet portlet = getPortletFactory().getPortletInstance( context.getConfig().getServletContext().getContext( portletApplicationContextPath ), pd ).getRealPortlet();            
+                        if ( portlet != null && portlet instanceof SupportsHeaderPhase )
+                        {
+                            log.debug( "renderHeaderFragment: " + pd.getPortletName() + " supports header phase" );
+                            
+                            HeaderResource hr = getHeaderResourceFactory().getHeaderResource( context, this.baseUrlAccess, isDesktop(), getHeaderConfiguration() );
+                            PortletHeaderRequest headerRequest = new PortletHeaderRequestImpl( context, portletWindow, portletApplicationContextPath );
+                            PortletHeaderResponse headerResponse = new PortletHeaderResponseImpl( context, hr, isDesktop(), getHeaderConfiguration(), getHeaderResourceRegistry() );
+                            ((SupportsHeaderPhase)portlet).doHeader( headerRequest, headerResponse );
+                            return true;
+                        }
                     }
                 }
             }
@@ -1142,10 +1140,6 @@
     {
         return this.factory;
     }
-    protected PortletWindowAccessor getPortletWindowAccessor()
-    {
-        return this.windowAccessor;
-    }
     protected HeaderResourceFactory getHeaderResourceFactory()
     {
         return this.headerResourceFactory;

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/PageAggregatorImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/PageAggregatorImpl.java?rev=758134&r1=758133&r2=758134&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/PageAggregatorImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/PageAggregatorImpl.java Wed Mar 25 03:24:47 2009
@@ -81,8 +81,8 @@
         context.getResponse().getWriter().write(root.getRenderedContent());
         if (null != window)
         {
-            context.getRequest().removeAttribute(PortalReservedParameters.MAXIMIZED_FRAGMENT_ATTRIBUTE);
-            context.getRequest().removeAttribute(PortalReservedParameters.MAXIMIZED_LAYOUT_ATTRIBUTE);
+            window.removeAttribute(PortalReservedParameters.MAXIMIZED_FRAGMENT_ATTRIBUTE);
+            window.removeAttribute(PortalReservedParameters.MAXIMIZED_LAYOUT_ATTRIBUTE);
         }
         releaseBuffers(root, context);        
     }
@@ -106,9 +106,8 @@
         ContentFragment maxedContentFragment = page.getContentFragmentById(window.getId().toString());
         if (maxedContentFragment != null)
         {
-            context.getRequest().setAttribute(PortalReservedParameters.MAXIMIZED_FRAGMENT_ATTRIBUTE, maxedContentFragment);
-            context.getRequest().setAttribute(PortalReservedParameters.FRAGMENT_ATTRIBUTE, maxedContentFragment);
-            context.getRequest().setAttribute(PortalReservedParameters.MAXIMIZED_LAYOUT_ATTRIBUTE, page.getRootContentFragment());
+            window.setAttribute(PortalReservedParameters.MAXIMIZED_FRAGMENT_ATTRIBUTE, maxedContentFragment);
+            window.setAttribute(PortalReservedParameters.MAXIMIZED_LAYOUT_ATTRIBUTE, page.getRootContentFragment());
 
             try
             {

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/PortletHeaderRequestImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/PortletHeaderRequestImpl.java?rev=758134&r1=758133&r2=758134&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/PortletHeaderRequestImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/PortletHeaderRequestImpl.java Wed Mar 25 03:24:47 2009
@@ -54,7 +54,7 @@
     {
         if (pd == null)
         {
-            pd = portletWindow.getPortletEntity().getPortletDefinition();
+            pd = portletWindow.getPortletDefinition();
         }
         InitParam param = pd.getInitParam(name);
         return param != null ? param.getParamValue() : null;

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/PortletRendererImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/PortletRendererImpl.java?rev=758134&r1=758133&r2=758134&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/PortletRendererImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/PortletRendererImpl.java Wed Mar 25 03:24:47 2009
@@ -16,10 +16,9 @@
  */
 package org.apache.jetspeed.aggregator.impl;
 
+import java.util.ArrayList;
 import java.util.Collection;
-import java.util.HashMap;
 import java.util.Iterator;
-import java.util.Map;
 import java.util.List;
 
 import javax.servlet.http.HttpServletRequest;
@@ -43,19 +42,15 @@
 import org.apache.jetspeed.cache.CacheElement;
 import org.apache.jetspeed.cache.ContentCacheKey;
 import org.apache.jetspeed.cache.JetspeedCache;
-import org.apache.jetspeed.components.portletentity.PortletEntityNotStoredException;
-import org.apache.jetspeed.container.window.FailedToRetrievePortletWindow;
-import org.apache.jetspeed.container.window.PortletWindowAccessor;
+import org.apache.jetspeed.container.window.FailedToCreateWindowException;
 import org.apache.jetspeed.om.page.ContentFragment;
 import org.apache.jetspeed.om.portlet.LocalizedField;
 import org.apache.jetspeed.om.portlet.PortletDefinition;
-import org.apache.jetspeed.om.window.impl.PortletWindowImpl;
 import org.apache.jetspeed.request.RequestContext;
 import org.apache.jetspeed.security.SecurityAccessController;
 import org.apache.jetspeed.services.title.DynamicTitleService;
 import org.apache.jetspeed.statistics.PortalStatistics;
 import org.apache.pluto.container.PortletContainer;
-import org.apache.jetspeed.container.PortletEntity;
 import org.apache.jetspeed.container.PortletWindow;
 
 /**
@@ -77,7 +72,6 @@
 
     protected WorkerMonitor workMonitor;
     protected PortletContainer container;
-    protected PortletWindowAccessor windowAccessor;
     protected PortalStatistics statistics;
     protected DynamicTitleService addTitleService;
 
@@ -105,7 +99,6 @@
     public static final String OUT_OF_SERVICE_MESSAGE = "Portlet is not responding and has been taken out of service.";
     
     public PortletRendererImpl(PortletContainer container, 
-                               PortletWindowAccessor windowAccessor,
                                WorkerMonitor workMonitor,
                                PortalStatistics statistics,
                                DynamicTitleService addTitleService,
@@ -116,7 +109,6 @@
                                boolean overrideTitles)
     {
         this.container = container;
-        this.windowAccessor = windowAccessor;
         this.workMonitor = workMonitor;
         this.statistics = statistics;
         this.addTitleService = addTitleService;
@@ -128,7 +120,6 @@
     }
 
     public PortletRendererImpl(PortletContainer container, 
-            PortletWindowAccessor windowAccessor,
             WorkerMonitor workMonitor,
             PortalStatistics statistics,
             DynamicTitleService addTitleService,
@@ -137,33 +128,30 @@
             SecurityAccessController accessController,
             JetspeedCache portletContentCache)
     {
-        this(container, windowAccessor, workMonitor, statistics, 
+        this(container, workMonitor, statistics, 
              addTitleService, portletTracking, checkSecurityConstraints,
              accessController, portletContentCache, false);
     }
     
     public PortletRendererImpl(PortletContainer container, 
-                               PortletWindowAccessor windowAccessor,
                                WorkerMonitor workMonitor,
                                PortalStatistics statistics,
                                DynamicTitleService addTitleService)
     {
-        this(container, windowAccessor, workMonitor, statistics, null, null, false, null, null, true);
+        this(container, workMonitor, statistics, null, null, false, null, null, true);
     }
 
     public PortletRendererImpl(PortletContainer container, 
-                               PortletWindowAccessor windowAccessor,
                                WorkerMonitor workMonitor,
                                PortalStatistics statistics)
     {
-        this( container, windowAccessor, workMonitor, statistics, null );
+        this( container, workMonitor, statistics, null );
     }
     
     public PortletRendererImpl(PortletContainer container, 
-                               PortletWindowAccessor windowAccessor,
                                WorkerMonitor workMonitor)
     {
-        this( container, windowAccessor, workMonitor, null );
+        this( container, workMonitor, null );
     }
     
     public void start()
@@ -186,15 +174,22 @@
      */
     public void renderNow( ContentFragment fragment, RequestContext requestContext )
     {
+        renderNow(fragment, requestContext, false);
+    }
+    /**
+     * Render the specified Page fragment. Result is returned in the
+     * PortletResponse.
+     */
+    public void renderNow( ContentFragment fragment, RequestContext requestContext, boolean spawned )
+    {
         HttpServletRequest servletRequest =null;
         HttpServletResponse servletResponse = null;
         ContentDispatcherCtrl dispatcher = null;    
         boolean contentIsCached = false;
         try
         {
-            PortletWindow portletWindow = getPortletWindow(fragment);
-            PortletDefinition portletDefinition = 
-                (PortletDefinition) portletWindow.getPortletEntity().getPortletDefinition();           
+            PortletWindow portletWindow = getPortletWindow(fragment, requestContext);
+            PortletDefinition portletDefinition = portletWindow.getPortletDefinition();           
             if (checkSecurityConstraints && !checkSecurityConstraint(portletDefinition, fragment))
             {
                 throw new PortletAccessDeniedException("Access Denied.");
@@ -214,17 +209,24 @@
                     return;
                 contentIsCached = true;
             }
-            if (dispatcher == null)
-            {
-                dispatcher = createDispatcher(requestContext, fragment, expirationCache);
-            }
-            servletRequest = requestContext.getRequestForWindow(portletWindow);
-            servletResponse = dispatcher.getResponseForWindow(portletWindow, requestContext);
+            dispatcher = createDispatcher(requestContext, fragment, expirationCache);
+            servletRequest = requestContext.getRequest();
+            servletResponse = requestContext.getResponse();
             RenderingJob rJob = 
                 buildRenderingJob(portletWindow, fragment, servletRequest, servletResponse,
-                                  requestContext, false, portletDefinition, dispatcher, null, 
+                                  requestContext, spawned, portletDefinition, dispatcher, null, 
                                   expirationCache, contentIsCached, timeoutMetadata);
-            rJob.execute();
+            if (spawned)
+            {
+                ArrayList<RenderingJob> jobs = new ArrayList<RenderingJob>();
+                jobs.add(rJob);
+                processRenderingJob(rJob, true);
+                waitForRenderingJobs(jobs);
+            }
+            else
+            {
+                rJob.execute();
+            }
             addTitleToHeader( portletWindow, fragment, servletRequest, servletResponse, dispatcher, contentIsCached);
         }
         catch (PortletAccessDeniedException e)
@@ -294,8 +296,7 @@
      * Create a rendering job for the specified Page fragment.
      * The method returns a rendering job which should be passed to 'processRenderingJob(RenderingJob job)' method.
      * @return portlet rendering job to pass to render(RenderingJob job) method
-     * @throws FailedToRetrievePortletWindow
-     * @throws UnknownPortletDefinitionException
+     * @throws RuntimeException
      * @throws PortletAccessDeniedException
      */
     public RenderingJob createRenderingJob(ContentFragment fragment, RequestContext requestContext)
@@ -304,9 +305,8 @@
         boolean contentIsCached = false;       
         try
         {
-            PortletWindow portletWindow = getPortletWindow(fragment);
-            PortletDefinition portletDefinition = 
-                (PortletDefinition) portletWindow.getPortletEntity().getPortletDefinition();     
+            PortletWindow portletWindow = getPortletWindow(fragment, requestContext);
+            PortletDefinition portletDefinition = portletWindow.getPortletDefinition();     
 
             long timeoutMetadata = this.getTimeoutOnJob(portletDefinition);
             portletTracking.setExpiration(portletWindow, timeoutMetadata);            
@@ -407,7 +407,7 @@
             PortletContent portletContent = (PortletContent)cachedElement.getContent();            
             fragment.setPortletContent(portletContent);
             ContentDispatcherCtrl dispatcher = new ContentDispatcherImpl(portletContent);
-            HttpServletRequest servletRequest = requestContext.getRequestForWindow(portletWindow);
+            HttpServletRequest servletRequest = requestContext.getRequest();
 
             this.addTitleService.setDynamicTitle(portletWindow, servletRequest, dispatcher.getPortletContent(fragment).getTitle());
             return true;
@@ -431,36 +431,29 @@
         return request.getContentDispatcher();
     }
 
-
-    protected PortletWindow getPortletWindow( ContentFragment fragment ) throws FailedToRetrievePortletWindow, PortletEntityNotStoredException
+    protected PortletWindow getPortletWindow( ContentFragment fragment, RequestContext requestContext ) throws FailedToCreateWindowException
     {
-        // ObjectID oid = JetspeedObjectID.createFromString(fragment.getId());
-        PortletWindow portletWindow = windowAccessor.getPortletWindow(fragment);
+        PortletWindow portletWindow = requestContext.getPortletWindow(fragment);
 
         if (portletWindow == null)
         {
-            throw new FailedToRetrievePortletWindow("Portlet Window creation failed for fragment: "
+            throw new FailedToCreateWindowException("Portlet Window creation failed for fragment: "
                                                     + fragment.getId() + ", " + fragment.getName());
         }
-
-        PortletEntity portletEntity = portletWindow.getPortletEntity();
-        portletEntity.setFragment(fragment);
-        
-        ((PortletWindowImpl) portletWindow).setInstantlyRendered(fragment.isInstantlyRendered());
-
         return portletWindow;
     }
     
+
     protected RenderingJob buildRenderingJob( PortletWindow portletWindow, ContentFragment fragment, 
                                               RequestContext requestContext, boolean isParallel,
                                               PortletDefinition portletDefinition, 
                                               PortletContent portletContent, boolean contentIsCached, long timeoutMetadata)
-        throws PortletAccessDeniedException, FailedToRetrievePortletWindow, PortletEntityNotStoredException        
+        throws PortletAccessDeniedException        
     {
         int expirationCache = getExpirationCache(portletDefinition);
         ContentDispatcherCtrl dispatcher = createDispatcher(requestContext, fragment, expirationCache);
-        HttpServletRequest request = requestContext.getRequestForWindow(portletWindow);
-        HttpServletResponse response = dispatcher.getResponseForWindow(portletWindow, requestContext);
+        HttpServletRequest request = requestContext.getRequest();
+        HttpServletResponse response = requestContext.getResponse();
 
         return buildRenderingJob( portletWindow, fragment, request, response,
                                   requestContext, isParallel,
@@ -475,51 +468,18 @@
                                               ContentDispatcherCtrl dispatcher, 
                                               PortletContent portletContent, 
                                               int expirationCache, boolean contentIsCached, long timeoutMetadata)
-             throws PortletAccessDeniedException, FailedToRetrievePortletWindow, PortletEntityNotStoredException
    {    
         RenderingJob rJob = null;
                
-        request.setAttribute(PortalReservedParameters.PAGE_ATTRIBUTE, requestContext.getPage());
-        request.setAttribute(PortalReservedParameters.FRAGMENT_ATTRIBUTE, fragment);
-        request.setAttribute(PortalReservedParameters.CONTENT_DISPATCHER_ATTRIBUTE, dispatcher);
-        request.setAttribute(PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE, requestContext);
-        request.setAttribute(PortalReservedParameters.REQUEST_CONTEXT_OBJECTS, requestContext.getObjects());                        
-        request.setAttribute(PortalReservedParameters.PATH_ATTRIBUTE, requestContext.getAttribute(PortalReservedParameters.PATH_ATTRIBUTE));
-        request.setAttribute(PortalReservedParameters.PORTLET_WINDOW_ATTRIBUTE, portletWindow);
-        
         if (portletContent == null)
         {
             portletContent = dispatcher.getPortletContent(fragment);
             fragment.setPortletContent(portletContent);
         }
-        // In case of parallel mode, store attributes in a map to be refered by worker.
-        if (isParallel)
-        {
-            Map workerAttrs = new HashMap();
-            workerAttrs.put(PortalReservedParameters.PAGE_ATTRIBUTE, requestContext.getPage());
-            workerAttrs.put(PortalReservedParameters.FRAGMENT_ATTRIBUTE, fragment);
-            workerAttrs.put(PortalReservedParameters.CONTENT_DISPATCHER_ATTRIBUTE, dispatcher);
-            workerAttrs.put(PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE, requestContext);
-            workerAttrs.put(PortalReservedParameters.REQUEST_CONTEXT_OBJECTS, requestContext.getObjects());                                    
-            workerAttrs.put(PortalReservedParameters.PATH_ATTRIBUTE, requestContext.getAttribute(PortalReservedParameters.PATH_ATTRIBUTE));
-            workerAttrs.put(PortalReservedParameters.PORTLET_WINDOW_ATTRIBUTE, portletWindow);
-
-            // the portlet invoker is not thread safe; it stores current portlet definition as a member variable.
-            // so, store portlet definition as an attribute of worker
-            workerAttrs.put(PortalReservedParameters.PORTLET_DEFINITION_ATTRIBUTE, portletDefinition);
-
-            rJob = new RenderingJobImpl(container, this, portletDefinition, portletContent, fragment, dispatcher,
-                                                    request, response, requestContext, portletWindow, 
-                                                    statistics, expirationCache, contentIsCached, workerAttrs);
-            
-        }
-        else
-        {
-            rJob = new RenderingJobImpl(container, this, portletDefinition, portletContent, fragment, dispatcher,
-                                                         request, response, requestContext, portletWindow, 
-                                                         statistics, expirationCache, contentIsCached );
-            
-        }
+        
+        rJob = new RenderingJobImpl(container, this, portletDefinition, portletContent, fragment, dispatcher,
+                                    request, response, requestContext, portletWindow, 
+                                    statistics, expirationCache, contentIsCached );
         
         if (isParallel)
         {

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/PortletTrackingManagerImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/PortletTrackingManagerImpl.java?rev=758134&r1=758133&r2=758134&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/PortletTrackingManagerImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/PortletTrackingManagerImpl.java Wed Mar 25 03:24:47 2009
@@ -19,14 +19,11 @@
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashMap;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
 import org.apache.jetspeed.aggregator.PortletTrackingManager;
 import org.apache.jetspeed.aggregator.RenderTrackable;
-import org.apache.jetspeed.container.window.PortletWindowAccessor;
-import org.apache.jetspeed.om.portlet.PortletDefinition;
 import org.apache.jetspeed.container.PortletWindow;
 
 /**
@@ -52,11 +49,8 @@
      */
     protected int outOfServiceLimit;
     
-    protected PortletWindowAccessor windowAccessor;
-    
-    public PortletTrackingManagerImpl(PortletWindowAccessor windowAccessor, long defaultPortletTimeout, int outOfServiceLimit)
+    public PortletTrackingManagerImpl(long defaultPortletTimeout, int outOfServiceLimit)
     {
-        this.windowAccessor = windowAccessor;
         this.defaultPortletTimeout = defaultPortletTimeout;
         this.outOfServiceLimit = outOfServiceLimit;
     }
@@ -68,7 +62,7 @@
 
     public boolean exceededTimeout(long renderTime, PortletWindow window)
     {
-        RenderTrackable trackInfo = (RenderTrackable)window.getPortletEntity();
+        RenderTrackable trackInfo = (RenderTrackable)window;
         long defaultTimeout = this.getDefaultPortletTimeout();
         if (trackInfo.getExpiration() > 0)
         {
@@ -83,7 +77,7 @@
     
     public boolean isOutOfService(PortletWindow window)
     {
-        RenderTrackable trackable = (RenderTrackable)window.getPortletEntity();
+        RenderTrackable trackable = (RenderTrackable)window;
         if (trackable.getRenderTimeoutCount() > this.outOfServiceLimit)
         {
             return true;
@@ -98,79 +92,50 @@
     
     public void incrementRenderTimeoutCount(PortletWindow window)
     {
-        RenderTrackable trackable = (RenderTrackable)window.getPortletEntity();
+        RenderTrackable trackable = (RenderTrackable)window;
         trackable.incrementRenderTimeoutCount();       
     }
    
     public void success(PortletWindow window)
     {
-        RenderTrackable trackable = (RenderTrackable)window.getPortletEntity();
+        RenderTrackable trackable = (RenderTrackable)window;
         trackable.success();
     }
     
     public void setExpiration(PortletWindow window, long expiration)
     {
-        RenderTrackable trackable = (RenderTrackable)window.getPortletEntity();
+        RenderTrackable trackable = (RenderTrackable)window;
         trackable.setExpiration(expiration); // * 1000);                
     }
         
     public void takeOutOfService(PortletWindow window)
     {
-        RenderTrackable trackable = (RenderTrackable)window.getPortletEntity();
+        RenderTrackable trackable = (RenderTrackable)window;
         trackable.setRenderTimeoutCount((int)this.defaultPortletTimeout + 1);
     }
     
     public void putIntoService(PortletWindow window)
     {
-        RenderTrackable trackable = (RenderTrackable)window.getPortletEntity();
+        RenderTrackable trackable = (RenderTrackable)window;
         trackable.setRenderTimeoutCount(0);        
     }
     
     public void putIntoService(List fullPortletNames)
     {
-        Iterator windows = this.windowAccessor.getPortletWindows().iterator();
-        while (windows.hasNext())
-        {
-            PortletWindow window = (PortletWindow)windows.next();
-            PortletDefinition pd = (PortletDefinition)window.getPortletEntity().getPortletDefinition();          
-            for (int ix = 0; ix < fullPortletNames.size(); ix++)
-            {
-                if (pd.getUniqueName().equals(fullPortletNames.get(ix)))
-                {
-                    putIntoService(window);
-                }
-            }
-        }        
+        // TODO
     }
     
     public List getOutOfServiceList(String fullPortletName)
     {
         List outs = new ArrayList();
-        Iterator windows = this.windowAccessor.getPortletWindows().iterator();
-        while (windows.hasNext())
-        {
-            PortletWindow window = (PortletWindow)windows.next();
-            PortletDefinition pd = (PortletDefinition)window.getPortletEntity().getPortletDefinition();
-            if (pd.getUniqueName().equals(fullPortletName) && isOutOfService(window))
-            {
-                outs.add(window);
-            }
-        }
+        // TODO
         return outs;
     }
     
     public List getOutOfServiceList()
     {
         List outs = new ArrayList();
-        Iterator windows = this.windowAccessor.getPortletWindows().iterator();
-        while (windows.hasNext())
-        {
-            PortletWindow window = (PortletWindow)windows.next();
-            if (isOutOfService(window))
-            {
-                outs.add(window);                
-            }
-        }
+        // TODO
         return outs;
     }
 }
\ No newline at end of file

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/RenderingJobImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/RenderingJobImpl.java?rev=758134&r1=758133&r2=758134&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/RenderingJobImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/RenderingJobImpl.java Wed Mar 25 03:24:47 2009
@@ -17,30 +17,23 @@
 
 package org.apache.jetspeed.aggregator.impl;
 
-import java.util.Iterator;
 import java.util.Map;
 import java.util.HashMap;
-import java.util.Collection;
 import java.util.Collections;
-import java.util.Arrays;
 
 import javax.portlet.UnavailableException;
-import javax.servlet.ServletRequest;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpServletRequestWrapper;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.jetspeed.PortalReservedParameters;
 import org.apache.jetspeed.aggregator.ContentDispatcherCtrl;
-import org.apache.jetspeed.aggregator.CurrentWorkerContext;
 import org.apache.jetspeed.aggregator.PortletContent;
 import org.apache.jetspeed.aggregator.PortletRenderer;
 import org.apache.jetspeed.aggregator.PortletTrackingManager;
 import org.apache.jetspeed.aggregator.RenderingJob;
-import org.apache.jetspeed.components.portletentity.PortletEntityImpl;
 import org.apache.jetspeed.om.page.ContentFragment;
+import org.apache.jetspeed.om.page.Fragment;
 import org.apache.jetspeed.request.RequestContext;
 import org.apache.jetspeed.statistics.PortalStatistics;
 import org.apache.pluto.container.PortletContainer;
@@ -80,8 +73,10 @@
     protected boolean contentIsCached;
     
     protected int expirationCache = 0;
+    
+    protected Map<String, Object> workerAttributes;
 
-    protected Map workerAttributes;
+    protected boolean parallel;
 
     protected long startTimeMillis = 0;
     protected long timeout;
@@ -112,35 +107,10 @@
         this.requestContext = requestContext; 
         this.window = window;
         this.portletContent = portletContent; 
-        window.getPortletEntity().setFragment(fragment);
         this.expirationCache = expirationCache;
         this.contentIsCached = contentIsCached;
     }
 
-    public RenderingJobImpl(PortletContainer container, 
-                            PortletRenderer renderer,
-                            PortletDefinition portletDefinition,
-                            PortletContent portletContent, 
-                            ContentFragment fragment,
-                            ContentDispatcherCtrl dispatcher,
-                            HttpServletRequest request, 
-                            HttpServletResponse response, 
-                            RequestContext requestContext, 
-                            PortletWindow window,
-                            PortalStatistics statistics,
-                            int expirationCache,
-                            boolean contentIsCached,
-                            Map workerAttrs)
-    {
-        this(container, renderer, portletDefinition, portletContent, fragment, dispatcher,
-                        request, response, requestContext, window, statistics, expirationCache, contentIsCached);
-        
-        if (workerAttrs != null)
-        {
-            this.workerAttributes = Collections.synchronizedMap(workerAttrs);
-        }
-    }
-
     /**
      * Sets portlet timout in milliseconds.
      */
@@ -171,12 +141,13 @@
      * the WorkerMonitor. When done, pause until next scheduled scan.
      */
     public void run()
-    {       
+    {      
+        parallel = true;
+        boolean clearContext = requestContext.ensureThreadContext();
         try
         {
             if (this.timeout > 0) 
             {
-                CurrentWorkerContext.setParallelRenderingMode(true);
                 this.startTimeMillis = System.currentTimeMillis();
             }
 
@@ -186,6 +157,11 @@
         }
         finally
         {
+            if (clearContext)
+            {
+                requestContext.clearThreadContext();
+            }
+            parallel = false;
             synchronized (portletContent)
             {
                if (log.isDebugEnabled()) log.debug("Notifying completion of rendering job for fragment " + fragment.getId());                
@@ -204,68 +180,10 @@
     public void execute()
     {
         long start = System.currentTimeMillis();
-        boolean isParallelMode = false;
         PortletWindow curWindow = this.window;
         try
         {
             if (log.isDebugEnabled()) log.debug("Rendering OID "+this.window.getId()+" "+ this.request +" "+this.response);
-
-            // if the current thread is worker, then store attribues in that.
-            if (this.workerAttributes != null)
-            {
-                isParallelMode = CurrentWorkerContext.getParallelRenderingMode();
-                if (isParallelMode)
-                {
-                    Collection attrNames = Arrays.asList(this.workerAttributes.keySet().toArray());
-                    
-                    Iterator itAttrNames = attrNames.iterator();
-                    while (itAttrNames.hasNext()) 
-                    {
-                        String name = (String) itAttrNames.next();
-                        CurrentWorkerContext.setAttribute(name, this.workerAttributes.get(name));
-                    }
-                    
-                    // The portletEntity stores its portletDefinition into the ThreadLocal member,
-                    // before the worker starts doing a rendering job.
-                    // So the thread contexts are different from each other.
-                    // Therefore, in parallel mode, we have to clear threadlocal fragmentPortletDefinition cache
-                    // of portletEntity and to replace the portletDefinition with one of current worker context.
-                    // Refer to org.apache.jetspeed.components.portletentity.PortletEntityImpl class
-                    
-                    curWindow = (PortletWindow) 
-                        CurrentWorkerContext.getAttribute(PortalReservedParameters.PORTLET_WINDOW_ATTRIBUTE); 
-                    PortletEntityImpl curEntity = (PortletEntityImpl) curWindow.getPortletEntity();
-                    PortletDefinition oldPortletDefinition = curEntity.getPortletDefinition();
-                    PortletDefinition curPortletDefinition = (PortletDefinition)
-                        CurrentWorkerContext.getAttribute(PortalReservedParameters.PORTLET_DEFINITION_ATTRIBUTE);
-                    
-                    if (!oldPortletDefinition.isSameIdentity(curPortletDefinition)) {
-                        curEntity.setPortletDefinition(curPortletDefinition);
-                    }
-                }
-            }
-            
-            if (isParallelMode)
-            {
-                ServletRequest servletRequest = ((HttpServletRequestWrapper)((HttpServletRequestWrapper) this.request).getRequest()).getRequest();
-                
-                synchronized (servletRequest)
-                {
-                    this.request.setAttribute(PortalReservedParameters.FRAGMENT_ATTRIBUTE, fragment);
-                    this.request.setAttribute(PortalReservedParameters.PAGE_ATTRIBUTE, requestContext.getPage());
-                    this.request.setAttribute(PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE, requestContext);
-                    this.request.setAttribute(PortalReservedParameters.REQUEST_CONTEXT_OBJECTS, requestContext.getObjects());            
-                  //  this.request.setAttribute(PortalReservedParameters.CONTENT_DISPATCHER_ATTRIBUTE,dispatcher);
-                }
-            }
-            else
-            {
-                this.request.setAttribute(PortalReservedParameters.FRAGMENT_ATTRIBUTE, fragment);
-                this.request.setAttribute(PortalReservedParameters.PAGE_ATTRIBUTE, requestContext.getPage());
-                this.request.setAttribute(PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE, requestContext);
-                this.request.setAttribute(PortalReservedParameters.REQUEST_CONTEXT_OBJECTS, requestContext.getObjects());            
-              //  this.request.setAttribute(PortalReservedParameters.CONTENT_DISPATCHER_ATTRIBUTE,dispatcher);
-            }
             container.doRender(this.window, this.request, this.response);               
             this.response.flushBuffer();                           
         }
@@ -286,16 +204,14 @@
         {
             try
             {
-                if (isParallelMode)
+                if (parallel)
                 {
                     this.renderer.addTitleToHeader(curWindow, fragment,
                                                    this.request, this.response,
                                                    this.dispatcher, this.contentIsCached);
-                
-                    CurrentWorkerContext.removeAllAttributes();
                 }
                 
-                if (fragment.getType().equals(ContentFragment.PORTLET))
+                if (fragment.getType().equals(Fragment.PORTLET))
                 {
                     long end = System.currentTimeMillis();
                     boolean exceededTimeout = portletTracking.exceededTimeout(end - start, window);
@@ -307,7 +223,7 @@
                     if (exceededTimeout)
                     {
                         // took too long to render
-                        log.info("Portlet Exceeded timeout: " + curWindow.getPortletEntity().getPortletDefinition().getPortletName() + " for window " + curWindow.getId());
+                        log.info("Portlet Exceeded timeout: " + curWindow.getPortletDefinition().getPortletName() + " for window " + curWindow.getId());
                         portletTracking.incrementRenderTimeoutCount(curWindow);
                     }
                     else
@@ -403,7 +319,7 @@
     {
         if (this.workerAttributes == null)
         {
-            this.workerAttributes = Collections.synchronizedMap(new HashMap());
+            this.workerAttributes = Collections.synchronizedMap(new HashMap<String, Object>());
         }
         
         if (value != null)

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/ContainerValve.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/ContainerValve.java?rev=758134&r1=758133&r2=758134&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/ContainerValve.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/ContainerValve.java Wed Mar 25 03:24:47 2009
@@ -19,9 +19,8 @@
 import javax.servlet.http.HttpServletResponse;
 
 import org.apache.jetspeed.request.RequestContext;
-import org.apache.jetspeed.container.state.MutableNavigationalState;
-import org.apache.jetspeed.om.page.Page;
-import org.apache.jetspeed.om.window.impl.PortletWindowImpl;
+import org.apache.jetspeed.container.state.NavigationalState;
+import org.apache.jetspeed.container.url.PortalURL;
 import org.apache.jetspeed.pipeline.PipelineException;
 import org.apache.jetspeed.pipeline.valve.AbstractValve;
 import org.apache.jetspeed.pipeline.valve.ValveContext;
@@ -46,45 +45,26 @@
             request.getRequest().getSession(true);
 
             // PortletContainerServices.prepare();
-            MutableNavigationalState state = (MutableNavigationalState)request.getPortalURL().getNavigationalState();
+            NavigationalState state = request.getPortalURL().getNavigationalState();
             if (state != null)
             {
-                boolean redirect = false;
-                Page page = request.getPage();
-                PortletWindow window = state.getPortletWindowOfResource();
-                if (window != null && page.getFragmentById(window.getId().toString()) == null)
+                boolean syncResult = state.sync(request);
+                if (!syncResult)
                 {
-                    // target window doesn't exists anymore or the target page is not accessible (anymore)
-                    request.getResponse().sendError(HttpServletResponse.SC_NOT_FOUND);
-                    return;
-                }
-                window = state.getPortletWindowOfAction();
-                if (window != null && page.getFragmentById(window.getId().toString()) == null)
-                {
-                    if (!((PortletWindowImpl) window).isInstantlyRendered())
+                    if (PortalURL.URLType.ACTION == state.getURLType())
                     {
-                        // target window doesn't exists anymore or the target page is not accessible (anymore)
-                        // remove any navigational state for the window
-                        state.removeState(window);
-                        // as this is an action request which cannot be handled, perform a direct redirect after sync state (for the other windows)
-                        redirect = true;
+                        // target page doesn't contain (anymore) the targeted windowOfAction 
+                        // this can also occur when a session is expired and the target page isn't accessible for the anonymous user
+                        // Redirect the user back to the target page (with possibly retaining the other windows navigational state).
+                        request.getResponse().sendRedirect(request.getPortalURL().getPortalURL());
+                        return;
+                    }
+                    else
+                    {
+                        // target resource window doesn't exists anymore or the target page is not accessible (anymore)
+                        request.getResponse().sendError(HttpServletResponse.SC_NOT_FOUND);
+                        return;
                     }
-                }
-                window = state.getMaximizedWindow();
-                if (window != null && page.getFragmentById(window.getId().toString()) == null)
-                {
-                    // target window doesn't exists anymore or the target page is not accessible (anymore)
-                    // remove any navigational state for the window
-                    state.removeState(window);
-                }
-                state.sync(request);
-                if (redirect)
-                {
-                    // target page doesn't contain (anymore) the targeted windowOfAction 
-                    // this can also occur when a session is expired and the target page isn't accessible for the anonymous user
-                    // Redirect the user back to the target page (with possibly retaining the other windows navigational state).
-                    request.getResponse().sendRedirect(request.getPortalURL().getPortalURL());
-                    return;
                 }
 
                 PortletWindow actionWindow = state.getPortletWindowOfAction();



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