Author: chris.laprun(a)jboss.com
Date: 2010-10-20 21:16:32 -0400 (Wed, 20 Oct 2010)
New Revision: 4756
Modified:
portal/trunk/component/wsrp/src/main/java/org/gatein/portal/wsrp/WSRPServiceIntegration.java
portal/trunk/pom.xml
Log:
- GTNWSRP-67, GTNWSRP-49: Use WSRP-specific event payload interceptor in the container
stack to properly handle payloads.
- Updated to WSRP 2.0.0-Beta03.
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-10-21
00:33:02 UTC (rev 4755)
+++
portal/trunk/component/wsrp/src/main/java/org/gatein/portal/wsrp/WSRPServiceIntegration.java 2010-10-21
01:16:32 UTC (rev 4756)
@@ -28,12 +28,24 @@
import org.exoplatform.container.configuration.ConfigurationManager;
import org.exoplatform.container.xml.InitParams;
import org.exoplatform.portal.pc.ExoKernelIntegration;
+import org.exoplatform.portal.pc.ExoPortletApplicationDeployer;
import org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator;
import org.exoplatform.services.listener.ListenerService;
import org.gatein.common.logging.Logger;
import org.gatein.common.logging.LoggerFactory;
import org.gatein.pc.api.PortletInvoker;
+import org.gatein.pc.bridge.BridgeInterceptor;
import org.gatein.pc.federation.FederatingPortletInvoker;
+import org.gatein.pc.portlet.PortletInvokerInterceptor;
+import org.gatein.pc.portlet.aspects.CCPPInterceptor;
+import org.gatein.pc.portlet.aspects.ContextDispatcherInterceptor;
+import org.gatein.pc.portlet.aspects.EventPayloadInterceptor;
+import org.gatein.pc.portlet.aspects.ProducerCacheInterceptor;
+import org.gatein.pc.portlet.aspects.RequestAttributeConversationInterceptor;
+import org.gatein.pc.portlet.aspects.SecureTransportInterceptor;
+import org.gatein.pc.portlet.aspects.SessionInvalidatorInterceptor;
+import org.gatein.pc.portlet.aspects.ValveInterceptor;
+import org.gatein.pc.portlet.container.ContainerPortletDispatcher;
import org.gatein.pc.portlet.container.ContainerPortletInvoker;
import org.gatein.pc.portlet.impl.state.StateConverterV0;
import org.gatein.pc.portlet.impl.state.StateManagementPolicyService;
@@ -59,6 +71,7 @@
import org.gatein.wsrp.consumer.migration.MigrationService;
import org.gatein.wsrp.consumer.registry.ActivatingNullInvokerHandler;
import org.gatein.wsrp.consumer.registry.ConsumerRegistry;
+import org.gatein.wsrp.payload.WSRPEventPayloadInterceptor;
import org.gatein.wsrp.producer.ProducerHolder;
import org.gatein.wsrp.producer.WSRPPortletInvoker;
import org.gatein.wsrp.producer.WSRPProducer;
@@ -178,10 +191,42 @@
RegistrationManager registrationManager = new RegistrationManagerImpl();
registrationManager.setPersistenceManager(registrationPersistenceManager);
- // retrieve container portlet invoker from eXo kernel
- ContainerPortletInvoker containerPortletInvoker =
-
(ContainerPortletInvoker)container.getComponentInstanceOfType(ContainerPortletInvoker.class);
+ // initialize container portlet invoker and its stack
+ // The portlet container invoker used by producer to dispatch to portlets
+ ContainerPortletInvoker containerPortletInvoker = new ContainerPortletInvoker();
+ //Container Stack
+ ContainerPortletDispatcher portletContainerDispatcher = new
ContainerPortletDispatcher();
+
+ // use the WSRP-specific event payload interceptor
+ WSRPEventPayloadInterceptor eventPayloadInterceptor = new
WSRPEventPayloadInterceptor();
+ eventPayloadInterceptor.setNext(portletContainerDispatcher);
+
+ // todo: not sure if WSRP ProducerPortletInvoker needs all these interceptors
+ RequestAttributeConversationInterceptor requestAttributeConversationInterceptor =
+ new RequestAttributeConversationInterceptor();
+ requestAttributeConversationInterceptor.setNext(eventPayloadInterceptor);
+ CCPPInterceptor ccppInterceptor = new CCPPInterceptor();
+ ccppInterceptor.setNext(requestAttributeConversationInterceptor);
+ BridgeInterceptor bridgepInterceptor = new BridgeInterceptor();
+ bridgepInterceptor.setNext(ccppInterceptor);
+ ProducerCacheInterceptor producerCacheInterceptor = new
ProducerCacheInterceptor();
+ producerCacheInterceptor.setNext(bridgepInterceptor);
+ SessionInvalidatorInterceptor sessionInvalidatorInterceptor = new
SessionInvalidatorInterceptor();
+ sessionInvalidatorInterceptor.setNext(producerCacheInterceptor);
+ ContextDispatcherInterceptor contextDispatcherInterceptor = new
ContextDispatcherInterceptor();
+ contextDispatcherInterceptor.setNext(sessionInvalidatorInterceptor);
+ SecureTransportInterceptor secureTransportInterceptor = new
SecureTransportInterceptor();
+ secureTransportInterceptor.setNext(contextDispatcherInterceptor);
+ ValveInterceptor valveInterceptor = new ValveInterceptor();
+
valveInterceptor.setPortletApplicationRegistry(exoKernelIntegration.getPortletApplicationRegistry());
+ valveInterceptor.setNext(secureTransportInterceptor);
+
+
contextDispatcherInterceptor.setServletContainerFactory(DefaultServletContainerFactory.getInstance());
+
+ // The portlet container invoker continued
+ containerPortletInvoker.setNext(valveInterceptor);
+
// The producer persistence manager
PortletStatePersistenceManager producerPersistenceManager;
try
@@ -206,12 +251,12 @@
producerPortletInvoker.setPersistenceManager(producerPersistenceManager);
producerPortletInvoker.setStateManagementPolicy(producerStateManagementPolicy);
producerPortletInvoker.setStateConverter(producerStateConverter);
-
+
WSRPPortletInvoker wsrpPortletInvoker = new WSRPPortletInvoker();
wsrpPortletInvoker.setNext(producerPortletInvoker);
wsrpPortletInvoker.setRegistrationManager(registrationManager);
-
+
// create and wire WSRP producer
producer = ProducerHolder.getProducer(true);
producer.setPortletInvoker(wsrpPortletInvoker);
Modified: portal/trunk/pom.xml
===================================================================
--- portal/trunk/pom.xml 2010-10-21 00:33:02 UTC (rev 4755)
+++ portal/trunk/pom.xml 2010-10-21 01:16:32 UTC (rev 4756)
@@ -48,7 +48,7 @@
<org.gatein.wci.version>2.0.2-GA</org.gatein.wci.version>
<org.gatein.pc.version>2.2.0-Beta06</org.gatein.pc.version>
<org.picketlink.idm>1.1.6.GA</org.picketlink.idm>
- <org.gatein.wsrp.version>2.0.0-Beta02</org.gatein.wsrp.version>
+ <org.gatein.wsrp.version>2.0.0-Beta03</org.gatein.wsrp.version>
<org.gatein.mop.version>1.0.3-GA</org.gatein.mop.version>
<org.slf4j.version>1.5.6</org.slf4j.version>
<rhino.version>1.6R5</rhino.version>
Show replies by date