[gatein-commits] gatein SVN: r5186 - in portal/trunk: component/wsrp/src/main/java/org/gatein/portal/wsrp and 1 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Fri Nov 19 13:57:10 EST 2010


Author: mwringe
Date: 2010-11-19 13:57:09 -0500 (Fri, 19 Nov 2010)
New Revision: 5186

Modified:
   portal/trunk/component/pc/src/main/java/org/exoplatform/portal/pc/ExoKernelIntegration.java
   portal/trunk/component/wsrp/src/main/java/org/gatein/portal/wsrp/WSRPServiceIntegration.java
   portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/PortletExtraSerializer.java
   portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIAddApplicationForm.java
   portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIPortletManagement.java
Log:
GTNWSRP-162: move the FederatingPortletInvoker from the start of the PortletInvokerInterceptor to right before the producer gets called. This allows for things like ConsumerCaching to be available to the various portlet invokers included in the FederatingPortletInvoker.

Modified: portal/trunk/component/pc/src/main/java/org/exoplatform/portal/pc/ExoKernelIntegration.java
===================================================================
--- portal/trunk/component/pc/src/main/java/org/exoplatform/portal/pc/ExoKernelIntegration.java	2010-11-19 18:32:10 UTC (rev 5185)
+++ portal/trunk/component/pc/src/main/java/org/exoplatform/portal/pc/ExoKernelIntegration.java	2010-11-19 18:57:09 UTC (rev 5186)
@@ -86,6 +86,10 @@
 
       //Container Stack
       ContainerPortletDispatcher portletContainerDispatcher = new ContainerPortletDispatcher();
+      
+      // Federating portlet invoker
+      FederatingPortletInvoker federatingPortletInvoker = new FederatingPortletInvokerService();
+      
       EventPayloadInterceptor eventPayloadInterceptor = new EventPayloadInterceptor();
       eventPayloadInterceptor.setNext(portletContainerDispatcher);
       RequestAttributeConversationInterceptor requestAttributeConversationInterceptor =
@@ -129,26 +133,24 @@
       // The producer portlet invoker
       ProducerPortletInvoker producerPortletInvoker = new ProducerPortletInvoker();
       producerPortletInvoker.setNext(containerPortletInvoker);
+      federatingPortletInvoker.registerInvoker(PortletInvoker.LOCAL_PORTLET_INVOKER_ID, producerPortletInvoker);
+
       producerPortletInvoker.setPersistenceManager(producerPersistenceManager);
       producerPortletInvoker.setStateManagementPolicy(producerStateManagementPolicy);
       producerPortletInvoker.setStateConverter(producerStateConverter);
 
       // The consumer portlet invoker
       PortletCustomizationInterceptor portletCustomizationInterceptor = new PortletCustomizationInterceptor();
-      portletCustomizationInterceptor.setNext(producerPortletInvoker);
+      portletCustomizationInterceptor.setNext(federatingPortletInvoker);
       ConsumerCacheInterceptor consumerCacheInterceptor = new ConsumerCacheInterceptor();
       consumerCacheInterceptor.setNext(portletCustomizationInterceptor);
       PortletInvokerInterceptor consumerPortletInvoker = new PortletInvokerInterceptor();
       consumerPortletInvoker.setNext(consumerCacheInterceptor);
 
-      // Federating portlet invoker
-      FederatingPortletInvoker federatingPortletInvoker = new FederatingPortletInvokerService();
+      // register federating portlet and consumerPortletInvoker invoker with container
+      container.registerComponentInstance(PortletInvoker.class, consumerPortletInvoker);
+      container.registerComponentInstance(FederatingPortletInvoker.class, federatingPortletInvoker);
 
-      // register local portlet invoker with federating portlet invoker
-      federatingPortletInvoker.registerInvoker(PortletInvoker.LOCAL_PORTLET_INVOKER_ID, consumerPortletInvoker);
-      // register federating portlet invoker with container
-      container.registerComponentInstance(PortletInvoker.class, federatingPortletInvoker);
-
       portletApplicationRegistry.start();
    }
 

Modified: portal/trunk/component/wsrp/src/main/java/org/gatein/portal/wsrp/WSRPServiceIntegration.java
===================================================================
--- portal/trunk/component/wsrp/src/main/java/org/gatein/portal/wsrp/WSRPServiceIntegration.java	2010-11-19 18:32:10 UTC (rev 5185)
+++ portal/trunk/component/wsrp/src/main/java/org/gatein/portal/wsrp/WSRPServiceIntegration.java	2010-11-19 18:57:09 UTC (rev 5186)
@@ -267,7 +267,7 @@
    {
       // retrieve federating portlet invoker from container
       FederatingPortletInvoker federatingPortletInvoker =
-         (FederatingPortletInvoker)container.getComponentInstanceOfType(PortletInvoker.class);
+         (FederatingPortletInvoker)container.getComponentInstanceOfType(FederatingPortletInvoker.class);
 
       // add our Session event listener to the ListenerService for use in org.exoplatform.web.GenericHttpListener
       ListenerService listenerService = (ListenerService)container.getComponentInstanceOfType(ListenerService.class);

Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/PortletExtraSerializer.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/PortletExtraSerializer.java	2010-11-19 18:32:10 UTC (rev 5185)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/PortletExtraSerializer.java	2010-11-19 18:57:09 UTC (rev 5186)
@@ -44,7 +44,7 @@
    public UIPortletManagement.PortletExtra read(PortletContext output) throws Exception
    {
       ExoContainer manager = ExoContainerContext.getCurrentContainer();
-      FederatingPortletInvoker portletInvoker = (FederatingPortletInvoker)manager.getComponentInstance(PortletInvoker.class);
+      FederatingPortletInvoker portletInvoker = (FederatingPortletInvoker)manager.getComponentInstance(FederatingPortletInvoker.class);
       Portlet portlet = portletInvoker.getPortlet(output);
       return new UIPortletManagement.PortletExtra(portlet);
    }

Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIAddApplicationForm.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIAddApplicationForm.java	2010-11-19 18:32:10 UTC (rev 5185)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIAddApplicationForm.java	2010-11-19 18:57:09 UTC (rev 5186)
@@ -186,7 +186,7 @@
       ExoContainer manager = ExoContainerContext.getCurrentContainer();
 
       FederatingPortletInvoker portletInvoker =
-         (FederatingPortletInvoker)manager.getComponentInstance(PortletInvoker.class);
+         (FederatingPortletInvoker)manager.getComponentInstance(FederatingPortletInvoker.class);
       Set<Portlet> portlets = remote ? portletInvoker.getRemotePortlets() : portletInvoker.getLocalPortlets();
       List<Application> applications = new ArrayList<Application>(portlets.size());
       for (Portlet portlet : portlets)

Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIPortletManagement.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIPortletManagement.java	2010-11-19 18:32:10 UTC (rev 5185)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIPortletManagement.java	2010-11-19 18:57:09 UTC (rev 5186)
@@ -100,7 +100,7 @@
       ExoContainer manager = ExoContainerContext.getCurrentContainer();
 
       FederatingPortletInvoker portletInvoker =
-         (FederatingPortletInvoker)manager.getComponentInstance(PortletInvoker.class);
+         (FederatingPortletInvoker)manager.getComponentInstance(FederatingPortletInvoker.class);
       boolean remote = REMOTE.equals(type);
 
       Set<Portlet> portlets;



More information about the gatein-commits mailing list