Author: mwringe
Date: 2009-08-27 18:44:34 -0400 (Thu, 27 Aug 2009)
New Revision: 107
Modified:
components/pc/trunk/test/pom.xml
components/pc/trunk/test/src/main/java/org/gatein/pc/test/controller/PortletControllerContextImpl.java
components/pc/trunk/test/src/main/java/org/gatein/pc/test/tck/TCKPortletControllerContext.java
components/pc/trunk/test/src/test/resources/portlet-tck-war/WEB-INF/jboss-portal-beans.xml
components/pc/trunk/test/src/test/resources/portlet-test-war/WEB-INF/jboss-portal-beans.xml
Log:
Attempt to get the remote tests working.
Modified: components/pc/trunk/test/pom.xml
===================================================================
--- components/pc/trunk/test/pom.xml 2009-08-27 21:12:44 UTC (rev 106)
+++ components/pc/trunk/test/pom.xml 2009-08-27 22:44:34 UTC (rev 107)
@@ -287,8 +287,12 @@
<property name="dependency.gatein-pc-pc.jar"
value="${maven.dependency.org.gatein.pc.pc-pc.jar.path}"/>
<property name="dependency.gatein-pc-controller.jar"
value="${maven.dependency.org.gatein.pc.pc-controller.jar.path}"/>
<property name="dependency.gatein-pc-mc.jar"
value="${maven.dependency.org.gatein.pc.pc-mc.jar.path}"/>
- <property name="dependency.gatein-pc-tests.test-jar"
value="${maven.dependency.org.gatein.pc.pc-pc.tests.test-jar.path}"/>
- <!-- <property
name="dependency.gatein-pc-tests.test-jar"
value="${maven.dependency.org.gatein.pc.pc-pc.tests.jar.path}"/> -->
+
+ <!-- NOTE: if the test url doesn't work for you, update
your version of maven.
+ The commentted version will work with older maven
versions, please do not commit it. -->
+ <property name="dependency.gatein-pc-tests.test-jar"
value="${maven.dependency.org.gatein.pc.pc-pc.tests.jar.path}"/>
+ <!-- <property
name="dependency.gatein-pc-tests.test-jar"
value="${maven.dependency.org.gatein.pc.pc-pc.tests.test-jar.path}"/>
-->
+
<property name="dependency.gatein-pc-api.jar"
value="${maven.dependency.org.gatein.pc.pc-api.jar.path}"/>
<property name="dependency.jboss-unit.jar"
value="${maven.dependency.org.jboss.unit.jboss-unit.jar.path}"/>
Modified:
components/pc/trunk/test/src/main/java/org/gatein/pc/test/controller/PortletControllerContextImpl.java
===================================================================
---
components/pc/trunk/test/src/main/java/org/gatein/pc/test/controller/PortletControllerContextImpl.java 2009-08-27
21:12:44 UTC (rev 106)
+++
components/pc/trunk/test/src/main/java/org/gatein/pc/test/controller/PortletControllerContextImpl.java 2009-08-27
22:44:34 UTC (rev 107)
@@ -41,6 +41,8 @@
import org.gatein.wci.IllegalRequestException;
import org.gatein.common.io.Serialization;
+import org.gatein.common.mc.bootstrap.WebBootstrap;
+
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -72,12 +74,13 @@
super(req, resp);
//
- //this.portletInvoker =
(PortletInvoker)servletContext.getAttribute(WebBootstrap.BEAN_PREFIX +
"ConsumerPortletInvoker");
+ this.portletInvoker =
(PortletInvoker)servletContext.getAttribute(WebBootstrap.BEAN_PREFIX +
"ConsumerPortletInvoker");
- ExoContainer exoContainer = ExoContainerContext.getCurrentContainer();
- this.portletInvoker =
(PortletInvoker)exoContainer.getComponentInstance(PortletInvoker.class);
-
+ //ExoContainer exoContainer = ExoContainerContext.getCurrentContainer();
+ //this.portletInvoker =
(PortletInvoker)exoContainer.getComponentInstance(PortletInvoker.class);
+ //System.out.println("PORTLET INVOKER PCCI2: " +
(PortletInvoker)exoContainer.getComponentInstance(PortletInvoker.class));
+
this.eventControllerContext = new EventControllerContextImpl(portletInvoker);
this.stateControllerContext = new StateControllerContextImpl(this);
this.serialization = new
PortletPageNavigationalStateSerialization(stateControllerContext);
Modified:
components/pc/trunk/test/src/main/java/org/gatein/pc/test/tck/TCKPortletControllerContext.java
===================================================================
---
components/pc/trunk/test/src/main/java/org/gatein/pc/test/tck/TCKPortletControllerContext.java 2009-08-27
21:12:44 UTC (rev 106)
+++
components/pc/trunk/test/src/main/java/org/gatein/pc/test/tck/TCKPortletControllerContext.java 2009-08-27
22:44:34 UTC (rev 107)
@@ -39,6 +39,8 @@
import org.gatein.wci.IllegalRequestException;
import org.gatein.common.io.Serialization;
+import org.gatein.common.mc.bootstrap.WebBootstrap;
+
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.ServletContext;
@@ -72,9 +74,11 @@
super(req, resp);
//
- //this.portletInvoker =
(PortletInvoker)servletContext.getAttribute(WebBootstrap.BEAN_PREFIX +
"ConsumerPortletInvoker");
- ExoContainer exoContainer = ExoContainerContext.getCurrentContainer();
- this.portletInvoker =
(PortletInvoker)exoContainer.getComponentInstance(PortletInvoker.class);
+ this.portletInvoker =
(PortletInvoker)servletContext.getAttribute(WebBootstrap.BEAN_PREFIX +
"ConsumerPortletInvoker");
+
+ //ExoContainer exoContainer = ExoContainerContext.getCurrentContainer();
+ //this.portletInvoker =
(PortletInvoker)exoContainer.getComponentInstance(PortletInvoker.class);
+ //System.out.println("PORTLET INVOKER TCKPCC2: " +
(PortletInvoker)exoContainer.getComponentInstance(PortletInvoker.class));
this.stateControllerContext = new TCKStateControllerContext(new
StateControllerContextImpl(this));
Modified:
components/pc/trunk/test/src/test/resources/portlet-tck-war/WEB-INF/jboss-portal-beans.xml
===================================================================
---
components/pc/trunk/test/src/test/resources/portlet-tck-war/WEB-INF/jboss-portal-beans.xml 2009-08-27
21:12:44 UTC (rev 106)
+++
components/pc/trunk/test/src/test/resources/portlet-tck-war/WEB-INF/jboss-portal-beans.xml 2009-08-27
22:44:34 UTC (rev 107)
@@ -22,92 +22,22 @@
~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org. ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<deployment xmlns="urn:jboss:bean-deployer:2.0">
-<!---->
-<!-- <bean name="PortletApplicationDeployer"
class="org.gatein.pc.mc.PortletApplicationDeployer">-->
-<!-- <alias>PortletApplicationRegistry</alias>-->
-<!-- <property name="servletContainer"><inject
bean="ServletContainer"/></property>-->
-<!-- <property name="containerPortletInvoker"><inject
bean="ContainerPortletInvoker"/></property>-->
-<!-- </bean>-->
-<!---->
-<!-- The ServletContainerFactory -->
-<!-- <bean name="ServletContainerFactory"
class="org.gatein.wci.impl.DefaultServletContainerFactory">-->
-<!-- <constructor
factoryClass="org.gatein.wci.impl.DefaultServletContainerFactory"
factoryMethod="getInstance"/>-->
-<!-- </bean>-->
-<!---->
-<!-- The servlet container obtained from the ServletContainerFactory -->
-<!-- <bean name="ServletContainer"
class="org.gatein.wci.ServletContainer">-->
-<!-- <constructor factoryMethod="getServletContainer">-->
-<!-- <factory bean="ServletContainerFactory"/>-->
-<!-- </constructor>-->
-<!-- </bean>-->
-<!---->
-<!-- The producer persistence manager -->
-<!-- <bean name="ProducerPersistenceManager"
class="org.gatein.pc.impl.state.producer.PortletStatePersistenceManagerService"/>-->
-<!---->
-<!-- The producer state management policy -->
-<!-- <bean name="ProducerStateManagementPolicy"
class="org.gatein.pc.impl.state.StateManagementPolicyService">-->
-<!-- <property
name="persistLocally"><value>true</value></property>-->
-<!-- </bean>-->
-<!---->
-<!-- The producer state converter -->
-<!-- <bean name="ProducerStateConverter"
class="org.gatein.pc.impl.state.StateConverterV0"/>-->
-<!---->
-<!-- The consumer portlet invoker -->
-<!-- <bean name="ConsumerPortletInvoker"
class="org.gatein.pc.PortletInvokerInterceptor">-->
-<!-- <property name="next"><inject
bean="ConsumerCacheInterceptor"/></property>-->
-<!-- </bean>-->
-<!-- <bean name="ConsumerCacheInterceptor"
class="org.gatein.pc.aspects.portlet.ConsumerCacheInterceptor">-->
-<!-- <property name="next"><inject
bean="PortletCustomizationInterceptor"/></property>-->
-<!-- </bean>-->
-<!-- <bean name="PortletCustomizationInterceptor"
class="org.gatein.pc.aspects.portlet.PortletCustomizationInterceptor">-->
-<!-- <property name="next"><inject
bean="ProducerPortletInvoker"/></property>-->
-<!-- </bean>-->
-<!---->
-<!-- The producer portlet invoker -->
-<!-- <bean name="ProducerPortletInvoker"
class="org.gatein.pc.state.producer.ProducerPortletInvoker">-->
-<!-- <property name="next"><inject
bean="ContainerPortletInvoker"/></property>-->
-<!-- <property name="persistenceManager"><inject
bean="ProducerPersistenceManager"/></property>-->
-<!-- <property name="stateManagementPolicy"><inject
bean="ProducerStateManagementPolicy"/></property>-->
-<!-- <property name="stateConverter"><inject
bean="ProducerStateConverter"/></property>-->
-<!-- </bean>-->
-<!---->
-<!-- The portlet container invoker -->
-<!-- <bean name="ContainerPortletInvoker"
class="org.gatein.pc.container.ContainerPortletInvoker">-->
-<!-- <property name="next"><inject
bean="ValveInterceptor"/></property>-->
-<!-- </bean>-->
-<!---->
-<!-- Container stack -->
-<!-- <bean name="ValveInterceptor"
class="org.gatein.pc.aspects.portlet.ValveInterceptor">-->
-<!-- <property name="portletApplicationRegistry"><inject
bean="PortletApplicationRegistry"
state="Instantiated"/></property>-->
-<!-- <property name="next"><inject
bean="SecureTransportInterceptor"/></property>-->
-<!-- </bean>-->
-<!-- <bean name="SecureTransportInterceptor"
class="org.gatein.pc.aspects.portlet.SecureTransportInterceptor">-->
-<!-- <property name="next"><inject
bean="ContextDispatcherInterceptor"/></property>-->
-<!-- </bean>-->
-<!-- <bean name="ContextDispatcherInterceptor"
class="org.gatein.pc.aspects.portlet.ContextDispatcherInterceptor">-->
-<!-- <property name="servletContainerFactory"><inject
bean="ServletContainerFactory"/></property>-->
-<!-- <property name="next"><inject
bean="ProducerCacheInterceptor"/></property>-->
-<!-- </bean>-->
-<!-- <bean name="ProducerCacheInterceptor"
class="org.gatein.pc.aspects.portlet.ProducerCacheInterceptor">-->
-<!-- <property name="next"><inject
bean="CCPPInterceptor"/></property>-->
-<!-- </bean>-->
-<!-- <bean name="CCPPInterceptor"
class="org.gatein.pc.aspects.portlet.CCPPInterceptor">-->
-<!-- <property name="next"><inject
bean="RequestAttributeConversationInterceptor"/></property>-->
-<!-- </bean>-->
-<!-- <bean name="RequestAttributeConversationInterceptor"
class="org.gatein.pc.aspects.portlet.RequestAttributeConversationInterceptor">-->
-<!-- <property name="next"><inject
bean="EventPayloadInterceptor"/></property>-->
-<!-- </bean>-->
-<!-- <bean name="EventPayloadInterceptor"
class="org.gatein.pc.aspects.portlet.EventPayloadInterceptor">-->
-<!-- <property name="next"><inject
bean="PortletContainerDispatcher"/></property>-->
-<!-- </bean>-->
-<!-- <bean name="PortletContainerDispatcher"
class="org.gatein.pc.container.ContainerPortletDispatcher">-->
-<!-- </bean>-->
-<!---->
-<!--</deployment>-->
- <bean name="PortletApplicationDeployer"
class="org.gatein.pc.mc.PortletApplicationDeployer">
+ <bean name="TestDriverServer"
class="org.jboss.unit.remote.driver.RemoteTestDriverServer"/>
+
+ <bean name="TestDriverServerExporter"
+
class="org.jboss.portal.test.framework.impl.generic.server.GenericServiceExporter">
+ <constructor>
+ <parameter>socket://localhost:5400</parameter>
+ <parameter><inject
bean="TestDriverServer"/></parameter>
+
<parameter>org.jboss.unit.remote.driver.RemoteTestDriver</parameter>
+ </constructor>
+ </bean>
+
+ <bean name="PortletApplicationDeployer"
class="org.gatein.pc.test.TestPortletApplicationDeployer">
<alias>PortletApplicationRegistry</alias>
<property name="servletContainer"><inject
bean="ServletContainer"/></property>
+ <property name="driver"><inject
bean="TestDriverServer"/></property>
<property name="containerPortletInvoker"><inject
bean="ContainerPortletInvoker"/></property>
</bean>
Modified:
components/pc/trunk/test/src/test/resources/portlet-test-war/WEB-INF/jboss-portal-beans.xml
===================================================================
---
components/pc/trunk/test/src/test/resources/portlet-test-war/WEB-INF/jboss-portal-beans.xml 2009-08-27
21:12:44 UTC (rev 106)
+++
components/pc/trunk/test/src/test/resources/portlet-test-war/WEB-INF/jboss-portal-beans.xml 2009-08-27
22:44:34 UTC (rev 107)
@@ -22,92 +22,22 @@
~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org. ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<deployment xmlns="urn:jboss:bean-deployer:2.0">
-<!---->
-<!-- <bean name="PortletApplicationDeployer"
class="org.gatein.pc.mc.PortletApplicationDeployer">-->
-<!-- <alias>PortletApplicationRegistry</alias>-->
-<!-- <property name="servletContainer"><inject
bean="ServletContainer"/></property>-->
-<!-- <property name="containerPortletInvoker"><inject
bean="ContainerPortletInvoker"/></property>-->
-<!-- </bean>-->
-<!---->
-<!-- The ServletContainerFactory -->
-<!-- <bean name="ServletContainerFactory"
class="org.gatein.wci.impl.DefaultServletContainerFactory">-->
-<!-- <constructor
factoryClass="org.gatein.wci.impl.DefaultServletContainerFactory"
factoryMethod="getInstance"/>-->
-<!-- </bean>-->
-<!---->
-<!-- The servlet container obtained from the ServletContainerFactory -->
-<!-- <bean name="ServletContainer"
class="org.gatein.wci.ServletContainer">-->
-<!-- <constructor factoryMethod="getServletContainer">-->
-<!-- <factory bean="ServletContainerFactory"/>-->
-<!-- </constructor>-->
-<!-- </bean>-->
-<!---->
-<!-- The producer persistence manager -->
-<!-- <bean name="ProducerPersistenceManager"
class="org.gatein.pc.impl.state.producer.PortletStatePersistenceManagerService"/>-->
-<!---->
-<!-- The producer state management policy -->
-<!-- <bean name="ProducerStateManagementPolicy"
class="org.gatein.pc.impl.state.StateManagementPolicyService">-->
-<!-- <property
name="persistLocally"><value>true</value></property>-->
-<!-- </bean>-->
-<!---->
-<!-- The producer state converter -->
-<!-- <bean name="ProducerStateConverter"
class="org.gatein.pc.impl.state.StateConverterV0"/>-->
-<!---->
-<!-- The consumer portlet invoker -->
-<!-- <bean name="ConsumerPortletInvoker"
class="org.gatein.pc.PortletInvokerInterceptor">-->
-<!-- <property name="next"><inject
bean="ConsumerCacheInterceptor"/></property>-->
-<!-- </bean>-->
-<!-- <bean name="ConsumerCacheInterceptor"
class="org.gatein.pc.aspects.portlet.ConsumerCacheInterceptor">-->
-<!-- <property name="next"><inject
bean="PortletCustomizationInterceptor"/></property>-->
-<!-- </bean>-->
-<!-- <bean name="PortletCustomizationInterceptor"
class="org.gatein.pc.aspects.portlet.PortletCustomizationInterceptor">-->
-<!-- <property name="next"><inject
bean="ProducerPortletInvoker"/></property>-->
-<!-- </bean>-->
-<!---->
-<!-- The producer portlet invoker -->
-<!-- <bean name="ProducerPortletInvoker"
class="org.gatein.pc.state.producer.ProducerPortletInvoker">-->
-<!-- <property name="next"><inject
bean="ContainerPortletInvoker"/></property>-->
-<!-- <property name="persistenceManager"><inject
bean="ProducerPersistenceManager"/></property>-->
-<!-- <property name="stateManagementPolicy"><inject
bean="ProducerStateManagementPolicy"/></property>-->
-<!-- <property name="stateConverter"><inject
bean="ProducerStateConverter"/></property>-->
-<!-- </bean>-->
-<!---->
-<!-- The portlet container invoker -->
-<!-- <bean name="ContainerPortletInvoker"
class="org.gatein.pc.container.ContainerPortletInvoker">-->
-<!-- <property name="next"><inject
bean="ValveInterceptor"/></property>-->
-<!-- </bean>-->
-<!---->
-<!-- Container stack -->
-<!-- <bean name="ValveInterceptor"
class="org.gatein.pc.aspects.portlet.ValveInterceptor">-->
-<!-- <property name="portletApplicationRegistry"><inject
bean="PortletApplicationRegistry"
state="Instantiated"/></property>-->
-<!-- <property name="next"><inject
bean="SecureTransportInterceptor"/></property>-->
-<!-- </bean>-->
-<!-- <bean name="SecureTransportInterceptor"
class="org.gatein.pc.aspects.portlet.SecureTransportInterceptor">-->
-<!-- <property name="next"><inject
bean="ContextDispatcherInterceptor"/></property>-->
-<!-- </bean>-->
-<!-- <bean name="ContextDispatcherInterceptor"
class="org.gatein.pc.aspects.portlet.ContextDispatcherInterceptor">-->
-<!-- <property name="servletContainerFactory"><inject
bean="ServletContainerFactory"/></property>-->
-<!-- <property name="next"><inject
bean="ProducerCacheInterceptor"/></property>-->
-<!-- </bean>-->
-<!-- <bean name="ProducerCacheInterceptor"
class="org.gatein.pc.aspects.portlet.ProducerCacheInterceptor">-->
-<!-- <property name="next"><inject
bean="CCPPInterceptor"/></property>-->
-<!-- </bean>-->
-<!-- <bean name="CCPPInterceptor"
class="org.gatein.pc.aspects.portlet.CCPPInterceptor">-->
-<!-- <property name="next"><inject
bean="RequestAttributeConversationInterceptor"/></property>-->
-<!-- </bean>-->
-<!-- <bean name="RequestAttributeConversationInterceptor"
class="org.gatein.pc.aspects.portlet.RequestAttributeConversationInterceptor">-->
-<!-- <property name="next"><inject
bean="EventPayloadInterceptor"/></property>-->
-<!-- </bean>-->
-<!-- <bean name="EventPayloadInterceptor"
class="org.gatein.pc.aspects.portlet.EventPayloadInterceptor">-->
-<!-- <property name="next"><inject
bean="PortletContainerDispatcher"/></property>-->
-<!-- </bean>-->
-<!-- <bean name="PortletContainerDispatcher"
class="org.gatein.pc.container.ContainerPortletDispatcher">-->
-<!-- </bean>-->
-<!---->
-<!--</deployment>-->
- <bean name="PortletApplicationDeployer"
class="org.gatein.pc.mc.PortletApplicationDeployer">
+ <bean name="TestDriverServer"
class="org.jboss.unit.remote.driver.RemoteTestDriverServer"/>
+
+ <bean name="TestDriverServerExporter"
+
class="org.jboss.portal.test.framework.impl.generic.server.GenericServiceExporter">
+ <constructor>
+ <parameter>socket://localhost:5400</parameter>
+ <parameter><inject
bean="TestDriverServer"/></parameter>
+
<parameter>org.jboss.unit.remote.driver.RemoteTestDriver</parameter>
+ </constructor>
+ </bean>
+
+ <bean name="PortletApplicationDeployer"
class="org.gatein.pc.test.TestPortletApplicationDeployer">
<alias>PortletApplicationRegistry</alias>
<property name="servletContainer"><inject
bean="ServletContainer"/></property>
+ <property name="driver"><inject
bean="TestDriverServer"/></property>
<property name="containerPortletInvoker"><inject
bean="ContainerPortletInvoker"/></property>
</bean>