Author: julien(a)jboss.com
Date: 2007-08-18 16:05:32 -0400 (Sat, 18 Aug 2007)
New Revision: 7989
Added:
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/agent/jboss/
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/agent/jboss/JBossTestAgent.java
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/agent/jboss/JBossTestAgentMBean.java
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/server/ServiceLookup.java
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/server/ServiceLookupFailedException.java
Removed:
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/agent/JBossTestAgent.java
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/agent/JBossTestAgentMBean.java
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/lookup/
Modified:
modules/test/trunk/build/build-thirdparty.xml
modules/test/trunk/build/ide/intellij/idea60/modules/test/test.iml
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/agent/TestAgent.java
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/deployment/Deployer.java
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/deployment/Deployment.java
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/driver/AbstractTestDriverServer.java
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/driver/remote/RemoteTestDriver.java
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/driver/remote/RemoteTestDriverClient.java
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/driver/remote/RemoteTestDriverServer.java
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/driver/remote/TestContext.java
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/runner/BaseRunner.java
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/server/Node.java
modules/test/trunk/test/src/resources/portal-test-agent-sar/META-INF/jboss-service.xml
modules/test/trunk/test/src/resources/portal-test-jar/org/jboss/portal/test/framework/container/http-runner-beans.xml
modules/test/trunk/test/src/resources/portal-test-jar/org/jboss/portal/test/framework/container/web-runner-beans.xml
Log:
make the test framework use remote mbean server rather than rmi in order to ease the usage
of jboss remoting in future
Modified: modules/test/trunk/build/build-thirdparty.xml
===================================================================
--- modules/test/trunk/build/build-thirdparty.xml 2007-08-18 12:07:24 UTC (rev 7988)
+++ modules/test/trunk/build/build-thirdparty.xml 2007-08-18 20:05:32 UTC (rev 7989)
@@ -57,6 +57,7 @@
<componentref name="apache-httpclient" version="3.0.1"/>
<componentref name="apache-logging"
version="1.0.5.SP1-jboss"/>
<componentref name="sun-opends" version="snapshot"/>
+ <componentref name="jboss/remoting" version="2.2.1.GA"/>
</build>
<synchronizeinfo/>
Modified: modules/test/trunk/build/ide/intellij/idea60/modules/test/test.iml
===================================================================
--- modules/test/trunk/build/ide/intellij/idea60/modules/test/test.iml 2007-08-18 12:07:24
UTC (rev 7988)
+++ modules/test/trunk/build/ide/intellij/idea60/modules/test/test.iml 2007-08-18 20:05:32
UTC (rev 7989)
@@ -247,7 +247,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root
url="jar://$MODULE_DIR$/../../../../../../thirdparty/apache-ant/lib/ant.jar!/"
/>
+ <root
url="jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/microcontainer/lib/jboss-microcontainer.jar!/"
/>
</CLASSES>
<JAVADOC />
<SOURCES />
@@ -256,7 +256,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root
url="jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/microcontainer/lib/jboss-microcontainer.jar!/"
/>
+ <root
url="jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/microcontainer/lib/jboss-container.jar!/"
/>
</CLASSES>
<JAVADOC />
<SOURCES />
@@ -265,7 +265,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root
url="jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/microcontainer/lib/jboss-container.jar!/"
/>
+ <root
url="jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/microcontainer/lib/jboss-dependency.jar!/"
/>
</CLASSES>
<JAVADOC />
<SOURCES />
@@ -274,7 +274,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root
url="jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/microcontainer/lib/jboss-dependency.jar!/"
/>
+ <root
url="jar://$MODULE_DIR$/../../../../../../thirdparty/sun-opends/lib/OpenDS.jar!/"
/>
</CLASSES>
<JAVADOC />
<SOURCES />
@@ -283,7 +283,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root
url="jar://$MODULE_DIR$/../../../../../../thirdparty/sun-opends/lib/OpenDS.jar!/"
/>
+ <root
url="jar://$MODULE_DIR$/../../../../../../test/selenium-java-client-driver-backport.jar!/"
/>
</CLASSES>
<JAVADOC />
<SOURCES />
@@ -292,7 +292,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root
url="jar://$MODULE_DIR$/../../../../../../test/selenium-java-client-driver-backport.jar!/"
/>
+ <root
url="jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-portal/modules/common/lib/portal-common-lib.jar!/"
/>
</CLASSES>
<JAVADOC />
<SOURCES />
@@ -301,12 +301,30 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root
url="jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-portal/modules/common/lib/portal-common-lib.jar!/"
/>
+ <root
url="jar://$MODULE_DIR$/../../../../../../tools/lib/cargo-core-uberjar-0.8.jar!/"
/>
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root
url="jar://$MODULE_DIR$/../../../../../../thirdparty/sun-servlet/lib/servlet-api.jar!/"
/>
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root
url="jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/remoting/lib/jboss-remoting.jar!/"
/>
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
<orderEntryProperties />
</component>
<component name="VcsManagerConfiguration">
Deleted:
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/agent/JBossTestAgent.java
===================================================================
---
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/agent/JBossTestAgent.java 2007-08-18
12:07:24 UTC (rev 7988)
+++
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/agent/JBossTestAgent.java 2007-08-18
20:05:32 UTC (rev 7989)
@@ -1,127 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.test.framework.agent;
-
-import org.jboss.deployment.DeploymentException;
-import org.jboss.deployment.MainDeployerMBean;
-import org.jboss.invocation.Invocation;
-import org.jboss.system.ServiceMBeanSupport;
-
-import java.lang.reflect.Method;
-import java.net.URL;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 5669 $
- */
-public class JBossTestAgent extends ServiceMBeanSupport implements JBossTestAgentMBean
-{
-
- /** Keep a thread local of sessions. */
- private static final ThreadLocal local = new ThreadLocal();
-
- /**
- * Record the exception that will be reused later by the same agent to be aware of the
recorded exception.
- *
- * @param e the deployment exception to log.
- */
- public static void record(DeploymentException e)
- {
- Session session = (Session)local.get();
-
- // Record the exception only if we have a session otherwise we may leek the
exception in the thread local.
- if (session != null && session.e == null)
- {
- session.e = e;
- }
- }
-
- /** The main deployer delegate. */
- private MainDeployerMBean mainDeployer;
-
- public MainDeployerMBean getMainDeployer()
- {
- return mainDeployer;
- }
-
- public void setMainDeployer(MainDeployerMBean mainDeployer)
- {
- this.mainDeployer = mainDeployer;
- }
-
- public void deploy(URL url) throws DeploymentException
- {
- perform(url, true);
- }
-
- public void undeploy(URL url) throws DeploymentException
- {
- perform(url, false);
- }
-
- private void perform(URL url, boolean deploy) throws DeploymentException
- {
- try
- {
- Session session = new Session();
- local.set(session);
-
- // The main deployer could throw an exception but that will be an exception not
related to jboss portal
- if (deploy)
- {
- mainDeployer.deploy(url);
- }
- else
- {
- mainDeployer.undeploy(url);
- }
-
- // If e is not null that means an exception was thrown into jboss portal layer
and we rethrow it
- // to the client
- if (session.e != null)
- {
- throw session.e;
- }
- }
- finally
- {
- local.set(null);
- }
- }
-
- /** Just a place holder for the deployment exception. */
- private static class Session
- {
- private DeploymentException e;
- }
-
- /**
- * Perform proxy call to ourself.
- */
- public Object invoke(Invocation invocation) throws Exception
- {
- Method method = invocation.getMethod();
- Object[] args = invocation.getArguments();
- return method.invoke(this, args);
- }
-}
Deleted:
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/agent/JBossTestAgentMBean.java
===================================================================
---
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/agent/JBossTestAgentMBean.java 2007-08-18
12:07:24 UTC (rev 7988)
+++
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/agent/JBossTestAgentMBean.java 2007-08-18
20:05:32 UTC (rev 7989)
@@ -1,42 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.test.framework.agent;
-
-import org.jboss.deployment.MainDeployerMBean;
-import org.jboss.invocation.Invocation;
-import org.jboss.system.ServiceMBean;
-
-import javax.management.ObjectName;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public interface JBossTestAgentMBean extends TestAgent, ServiceMBean
-{
- MainDeployerMBean getMainDeployer();
-
- void setMainDeployer(MainDeployerMBean mainDeployer);
-
- Object invoke(Invocation invocation) throws Exception;
-}
Modified:
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/agent/TestAgent.java
===================================================================
---
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/agent/TestAgent.java 2007-08-18
12:07:24 UTC (rev 7988)
+++
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/agent/TestAgent.java 2007-08-18
20:05:32 UTC (rev 7989)
@@ -22,8 +22,6 @@
******************************************************************************/
package org.jboss.portal.test.framework.agent;
-import org.jboss.deployment.DeploymentException;
-
import java.net.URL;
/**
@@ -32,13 +30,18 @@
*/
public interface TestAgent
{
+
+ /** . */
+ String SERVICE_ID = "TestAgent";
+
/**
*
*/
- void deploy(URL url) throws DeploymentException;
+ void deploy(URL url) throws Exception;
/**
*
*/
- void undeploy(URL url) throws DeploymentException;
+ void undeploy(URL url) throws Exception;
+
}
Copied:
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/agent/jboss/JBossTestAgent.java
(from rev 7987,
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/agent/JBossTestAgent.java)
===================================================================
---
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/agent/jboss/JBossTestAgent.java
(rev 0)
+++
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/agent/jboss/JBossTestAgent.java 2007-08-18
20:05:32 UTC (rev 7989)
@@ -0,0 +1,115 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.test.framework.agent.jboss;
+
+import org.jboss.deployment.DeploymentException;
+import org.jboss.deployment.MainDeployerMBean;
+import org.jboss.system.ServiceMBeanSupport;
+
+import java.net.URL;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 5669 $
+ */
+public class JBossTestAgent extends ServiceMBeanSupport implements JBossTestAgentMBean
+{
+
+ /** Keep a thread local of sessions. */
+ private static final ThreadLocal local = new ThreadLocal();
+
+ /**
+ * Record the exception that will be reused later by the same agent to be aware of the
recorded exception.
+ *
+ * @param e the deployment exception to log.
+ */
+ public static void record(DeploymentException e)
+ {
+ Session session = (Session)local.get();
+
+ // Record the exception only if we have a session otherwise we may leek the
exception in the thread local.
+ if (session != null && session.e == null)
+ {
+ session.e = e;
+ }
+ }
+
+ /** The main deployer delegate. */
+ private MainDeployerMBean mainDeployer;
+
+ public MainDeployerMBean getMainDeployer()
+ {
+ return mainDeployer;
+ }
+
+ public void setMainDeployer(MainDeployerMBean mainDeployer)
+ {
+ this.mainDeployer = mainDeployer;
+ }
+
+ public void deploy(URL url) throws Exception
+ {
+ perform(url, true);
+ }
+
+ public void undeploy(URL url) throws Exception
+ {
+ perform(url, false);
+ }
+
+ private void perform(URL url, boolean deploy) throws DeploymentException
+ {
+ try
+ {
+ Session session = new Session();
+ local.set(session);
+
+ // The main deployer could throw an exception but that will be an exception not
related to jboss portal
+ if (deploy)
+ {
+ mainDeployer.deploy(url);
+ }
+ else
+ {
+ mainDeployer.undeploy(url);
+ }
+
+ // If e is not null that means an exception was thrown into jboss portal layer
and we rethrow it
+ // to the client
+ if (session.e != null)
+ {
+ throw session.e;
+ }
+ }
+ finally
+ {
+ local.set(null);
+ }
+ }
+
+ /** Just a place holder for the deployment exception. */
+ private static class Session
+ {
+ private DeploymentException e;
+ }
+}
Property changes on:
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/agent/jboss/JBossTestAgent.java
___________________________________________________________________
Name: svn:executable
+
Copied:
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/agent/jboss/JBossTestAgentMBean.java
(from rev 7987,
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/agent/JBossTestAgentMBean.java)
===================================================================
---
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/agent/jboss/JBossTestAgentMBean.java
(rev 0)
+++
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/agent/jboss/JBossTestAgentMBean.java 2007-08-18
20:05:32 UTC (rev 7989)
@@ -0,0 +1,38 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.test.framework.agent.jboss;
+
+import org.jboss.deployment.MainDeployerMBean;
+import org.jboss.system.ServiceMBean;
+import org.jboss.portal.test.framework.agent.TestAgent;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public interface JBossTestAgentMBean extends TestAgent, ServiceMBean
+{
+ MainDeployerMBean getMainDeployer();
+
+ void setMainDeployer(MainDeployerMBean mainDeployer);
+}
Modified:
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/deployment/Deployer.java
===================================================================
---
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/deployment/Deployer.java 2007-08-18
12:07:24 UTC (rev 7988)
+++
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/deployment/Deployer.java 2007-08-18
20:05:32 UTC (rev 7989)
@@ -24,7 +24,6 @@
package org.jboss.portal.test.framework.deployment;
import org.jboss.portal.test.framework.server.Node;
-import org.jboss.portal.test.framework.lookup.ServiceLookup;
import java.net.MalformedURLException;
import java.net.URL;
@@ -45,19 +44,6 @@
/** . */
private Map deployments;
- /** . */
- private ServiceLookup testAgentLookup;
-
- public ServiceLookup getTestAgentLookup()
- {
- return testAgentLookup;
- }
-
- public void setTestAgentLookup(ServiceLookup testAgentLookup)
- {
- this.testAgentLookup = testAgentLookup;
- }
-
public void create()
{
}
@@ -97,7 +83,7 @@
public void deploy(URL url, Node[] nodes) throws Exception
{
Deployment deployment = new Deployment(nodes, url);
- deployment.deploy(testAgentLookup);
+ deployment.deploy();
deployments.put(url, deployment);
}
@@ -106,7 +92,7 @@
Deployment deployment = (Deployment)deployments.remove(url);
if (deployment != null)
{
- deployment.undeploy(testAgentLookup);
+ deployment.undeploy();
}
}
Modified:
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/deployment/Deployment.java
===================================================================
---
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/deployment/Deployment.java 2007-08-18
12:07:24 UTC (rev 7988)
+++
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/deployment/Deployment.java 2007-08-18
20:05:32 UTC (rev 7989)
@@ -28,7 +28,6 @@
import org.jboss.deployment.DeploymentException;
import org.jboss.portal.test.framework.agent.TestAgent;
import org.jboss.portal.test.framework.server.Node;
-import org.jboss.portal.test.framework.lookup.ServiceLookup;
import java.io.IOException;
import java.net.URL;
@@ -71,13 +70,12 @@
/**
* Deploy a portlet application. This method blocks until the deployment is finished
*
- * @throws org.jboss.deployment.DeploymentException
- * if the deployment process failed
- * @throws IllegalStateException if the session if closed
+ * @throws Exception any exception that would make the deployment process fail
+ * @throws IllegalStateException if the session if closed
* @throws IllegalArgumentException if the application name does not give a valid
deployment
* @throws java.io.IOException
*/
- void deploy(ServiceLookup testAgentLookup) throws DeploymentException,
IllegalArgumentException, IllegalStateException, IOException
+ void deploy() throws Exception, IllegalArgumentException, IllegalStateException,
IOException
{
if (deployed)
{
@@ -90,7 +88,7 @@
for (int i = 0;i < nodes.length;i++)
{
Node node = nodes[i];
- TestAgent agent = (TestAgent)testAgentLookup.getService(node);
+ TestAgent agent = (TestAgent)node.lookupService(TestAgent.SERVICE_ID);
agent.deploy(url);
}
}
@@ -113,7 +111,7 @@
}
/** Undeploy a portlet application. This method blocks until the undeployment is
finished. */
- void undeploy(ServiceLookup testAgentLookup)
+ void undeploy()
{
URL url = this.url;
this.url = null;
@@ -124,7 +122,7 @@
try
{
Node node = nodes[i];
- TestAgent agent = (TestAgent)testAgentLookup.getService(node);
+ TestAgent agent = (TestAgent)node.lookupService(TestAgent.SERVICE_ID);
agent.undeploy(url);
}
catch (Exception e)
Modified:
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/driver/AbstractTestDriverServer.java
===================================================================
---
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/driver/AbstractTestDriverServer.java 2007-08-18
12:07:24 UTC (rev 7988)
+++
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/driver/AbstractTestDriverServer.java 2007-08-18
20:05:32 UTC (rev 7989)
@@ -23,18 +23,16 @@
package org.jboss.portal.test.framework.driver;
import org.jboss.portal.test.framework.agent.TestAgent;
+import org.jboss.portal.test.framework.driver.remote.RemoteTestDriver;
import org.jboss.system.ServiceMBeanSupport;
-import org.jboss.invocation.Invocation;
-import java.lang.reflect.Method;
-
/**
* Just put here low level details such as the agent connection and the detyped
invocation stuff.
*
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-public abstract class AbstractTestDriverServer extends ServiceMBeanSupport
+public abstract class AbstractTestDriverServer extends ServiceMBeanSupport implements
RemoteTestDriver
{
/** . */
@@ -55,14 +53,4 @@
{
this.agent = agent;
}
-
- /**
- * Perform proxy call to ourself.
- */
- public Object invoke(Invocation invocation) throws Exception
- {
- Method method = invocation.getMethod();
- Object[] args = invocation.getArguments();
- return method.invoke(this, args);
- }
}
Modified:
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/driver/remote/RemoteTestDriver.java
===================================================================
---
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/driver/remote/RemoteTestDriver.java 2007-08-18
12:07:24 UTC (rev 7988)
+++
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/driver/remote/RemoteTestDriver.java 2007-08-18
20:05:32 UTC (rev 7989)
@@ -30,6 +30,10 @@
*/
public interface RemoteTestDriver extends TestDriver
{
+
+ /** . */
+ String SERVICE_ID = "TestDriverServer";
+
/**
* A client side push of an http test context for a specific test.
*/
Modified:
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/driver/remote/RemoteTestDriverClient.java
===================================================================
---
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/driver/remote/RemoteTestDriverClient.java 2007-08-18
12:07:24 UTC (rev 7988)
+++
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/driver/remote/RemoteTestDriverClient.java 2007-08-18
20:05:32 UTC (rev 7989)
@@ -25,7 +25,6 @@
import org.jboss.portal.test.framework.server.NodeId;
import org.jboss.portal.test.framework.server.NodeManager;
import org.jboss.portal.test.framework.server.Node;
-import org.jboss.portal.test.framework.lookup.ServiceLookup;
import org.jboss.portal.test.framework.info.TestItemInfo;
import org.jboss.portal.test.framework.driver.DriverResponse;
import org.jboss.portal.test.framework.driver.DriverCommand;
@@ -50,9 +49,6 @@
// Services
/** . */
- private ServiceLookup serverLookup;
-
- /** . */
private NodeManager nodeManager;
public NodeId getInitialNodeId()
@@ -85,19 +81,9 @@
this.nodeManager = nodeManager;
}
- public ServiceLookup getServerLookup()
- {
- return serverLookup;
- }
-
- public void setServerLookup(ServiceLookup serverLookup)
- {
- this.serverLookup = serverLookup;
- }
-
public RemoteTestDriver getServer(Node node)
{
- return (RemoteTestDriver)serverLookup.getService(node);
+ return (RemoteTestDriver)node.lookupService(RemoteTestDriver.SERVICE_ID);
}
public TestItemInfo getInfo()
Modified:
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/driver/remote/RemoteTestDriverServer.java
===================================================================
---
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/driver/remote/RemoteTestDriverServer.java 2007-08-18
12:07:24 UTC (rev 7988)
+++
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/driver/remote/RemoteTestDriverServer.java 2007-08-18
20:05:32 UTC (rev 7989)
@@ -34,12 +34,14 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 5636 $
*/
-public class RemoteTestDriverServer extends AbstractTestDriverServer implements
RemoteTestDriver, TestDriverContainer
+public class RemoteTestDriverServer extends AbstractTestDriverServer implements
TestDriverContainer
{
/** . */
protected final RemoteTestSuite suite;
+
+
public RemoteTestDriverServer()
{
suite = new RemoteTestSuite("Main");
Modified:
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/driver/remote/TestContext.java
===================================================================
---
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/driver/remote/TestContext.java 2007-08-18
12:07:24 UTC (rev 7988)
+++
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/driver/remote/TestContext.java 2007-08-18
20:05:32 UTC (rev 7989)
@@ -26,7 +26,6 @@
import org.jboss.portal.test.framework.agent.TestAgent;
import org.jboss.portal.test.framework.server.NodeId;
import org.jboss.portal.test.framework.TestParametrization;
-import org.jboss.deployment.DeploymentException;
import java.io.Serializable;
import java.io.File;
@@ -180,7 +179,7 @@
return tmp.toString();
}
- public void deploy(String archiveId) throws MalformedURLException,
IllegalStateException, DeploymentException
+ public void deploy(String archiveId) throws MalformedURLException,
IllegalStateException, Exception
{
if (testAgent == null)
{
@@ -194,7 +193,7 @@
testAgent.deploy(url);
}
- public void undeploy(String archiveId) throws MalformedURLException,
IllegalStateException, DeploymentException
+ public void undeploy(String archiveId) throws MalformedURLException,
IllegalStateException, Exception
{
if (testAgent == null)
{
Modified:
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/runner/BaseRunner.java
===================================================================
---
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/runner/BaseRunner.java 2007-08-18
12:07:24 UTC (rev 7988)
+++
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/runner/BaseRunner.java 2007-08-18
20:05:32 UTC (rev 7989)
@@ -26,7 +26,6 @@
import org.jboss.portal.test.framework.server.NodeManager;
import org.jboss.portal.test.framework.server.NodeId;
import org.jboss.portal.test.framework.mc.TestRuntimeContext;
-import org.jboss.portal.test.framework.lookup.ServiceLookup;
import org.jboss.portal.test.framework.driver.remote.RemoteTestDriverClient;
import org.jboss.portal.test.framework.junit.JUnitAdapter;
import org.jboss.portal.test.framework.TestParametrization;
@@ -55,8 +54,13 @@
Logger.getRoot().setLevel(Level.INFO);
}
+ /** . */
private static final int STOPPED = 0;
+
+ /** . */
private static final int FAILED = 1;
+
+ /** . */
private static final int STARTED = 2;
/** The injected deployer. */
@@ -81,12 +85,6 @@
private Integer testCaseCount;
/** . */
- private ServiceLookup testDriverServerLookup;
-
- /** . */
- private ServiceLookup testAgentLookup;
-
- /** . */
private RemoteTestDriverClient testDriverClient;
/** The node id list used for this test suite. */
@@ -131,26 +129,6 @@
this.nodeManager = nodeManager;
}
- public ServiceLookup getTestAgentLookup()
- {
- return testAgentLookup;
- }
-
- public void setTestAgentLookup(ServiceLookup testAgentLookup)
- {
- this.testAgentLookup = testAgentLookup;
- }
-
- public ServiceLookup getTestDriverServerLookup()
- {
- return testDriverServerLookup;
- }
-
- public void setTestDriverServerLookup(ServiceLookup testDriverServerLookup)
- {
- this.testDriverServerLookup = testDriverServerLookup;
- }
-
public RemoteTestDriverClient getTestDriverClient()
{
return testDriverClient;
@@ -183,7 +161,6 @@
testDriverClient.setInitialNodeId(nodeIds[0]);
testDriverClient.setArchivePath(archivePath);
testDriverClient.setNodeManager(nodeManager);
- testDriverClient.setServerLookup(testDriverServerLookup);
// Get optional parametrization
TestParametrization parametrization = JUnitAdapter.getParametrization();
Modified:
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/server/Node.java
===================================================================
---
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/server/Node.java 2007-08-18
12:07:24 UTC (rev 7988)
+++
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/server/Node.java 2007-08-18
20:05:32 UTC (rev 7989)
@@ -23,11 +23,15 @@
package org.jboss.portal.test.framework.server;
+import org.jboss.mx.util.MBeanProxy;
+import org.jboss.mx.util.MBeanProxyCreationException;
+
import javax.management.MBeanServer;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.naming.Context;
import java.util.Properties;
+import java.util.Map;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -45,11 +49,15 @@
/** . */
private final Properties jndiEnv;
- public Node(String id, MBeanServer mBeanServer, Properties jndiEnv)
+ /** . */
+ final Map serviceLookups;
+
+ public Node(String id, MBeanServer mBeanServer, Properties jndiEnv, Map
serviceLookups)
{
this.id = new NodeId(id);
this.mbeanServer = mBeanServer;
this.jndiEnv = jndiEnv;
+ this.serviceLookups = serviceLookups;
}
/**
@@ -62,6 +70,32 @@
return id;
}
+ public Object lookupService(String serviceId) throws ServiceLookupFailedException
+ {
+ ServiceLookup lookup = (ServiceLookup)serviceLookups.get(serviceId);
+
+ //
+ if (lookup == null)
+ {
+ return null;
+ }
+
+ //
+ try
+ {
+ Class proxyInterface =
Thread.currentThread().getContextClassLoader().loadClass(lookup.getServiceInterface());
+ return MBeanProxy.get(proxyInterface, lookup.getObjectName(), mbeanServer);
+ }
+ catch (ClassNotFoundException e)
+ {
+ throw new ServiceLookupFailedException(e);
+ }
+ catch (MBeanProxyCreationException e)
+ {
+ throw new ServiceLookupFailedException(e);
+ }
+ }
+
/**
* Returns the MBeanServer of the node.
*
Added:
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/server/ServiceLookup.java
===================================================================
---
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/server/ServiceLookup.java
(rev 0)
+++
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/server/ServiceLookup.java 2007-08-18
20:05:32 UTC (rev 7989)
@@ -0,0 +1,53 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.test.framework.server;
+
+import javax.management.ObjectName;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class ServiceLookup
+{
+
+ private final ObjectName objectName;
+
+ private final String serviceInterface;
+
+ public ServiceLookup(ObjectName objectName, String serviceInterface)
+ {
+ this.objectName = objectName;
+ this.serviceInterface = serviceInterface;
+ }
+
+ public ObjectName getObjectName()
+ {
+ return objectName;
+ }
+
+ public String getServiceInterface()
+ {
+ return serviceInterface;
+ }
+}
Added:
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/server/ServiceLookupFailedException.java
===================================================================
---
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/server/ServiceLookupFailedException.java
(rev 0)
+++
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/server/ServiceLookupFailedException.java 2007-08-18
20:05:32 UTC (rev 7989)
@@ -0,0 +1,49 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.test.framework.server;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class ServiceLookupFailedException extends RuntimeException
+{
+ public ServiceLookupFailedException()
+ {
+ }
+
+ public ServiceLookupFailedException(String message)
+ {
+ super(message);
+ }
+
+ public ServiceLookupFailedException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+ public ServiceLookupFailedException(Throwable cause)
+ {
+ super(cause);
+ }
+}
Modified:
modules/test/trunk/test/src/resources/portal-test-agent-sar/META-INF/jboss-service.xml
===================================================================
---
modules/test/trunk/test/src/resources/portal-test-agent-sar/META-INF/jboss-service.xml 2007-08-18
12:07:24 UTC (rev 7988)
+++
modules/test/trunk/test/src/resources/portal-test-agent-sar/META-INF/jboss-service.xml 2007-08-18
20:05:32 UTC (rev 7989)
@@ -25,16 +25,8 @@
<!-- The test agent. -->
<mbean
- code="org.jboss.portal.test.framework.agent.JBossTestAgent"
+ code="org.jboss.portal.test.framework.agent.jboss.JBossTestAgent"
name="portal.test:service=Agent">
<depends optional-attribute-name="MainDeployer"
proxy-type="attribute">jboss.system:service=MainDeployer</depends>
</mbean>
- <mbean
- code="org.jboss.invocation.jrmp.server.JRMPProxyFactory"
- name="portal.test:service=Invoker,name=Agent">
- <depends
optional-attribute-name="InvokerName">jboss:service=invoker,type=jrmp</depends>
- <depends
optional-attribute-name="TargetName">portal.test:service=Agent</depends>
- <attribute name="JndiName">TestAgent</attribute>
- <attribute
name="ExportedInterfaces">org.jboss.portal.test.framework.agent.TestAgent</attribute>
- </mbean>
</server>
\ No newline at end of file
Modified:
modules/test/trunk/test/src/resources/portal-test-jar/org/jboss/portal/test/framework/container/http-runner-beans.xml
===================================================================
---
modules/test/trunk/test/src/resources/portal-test-jar/org/jboss/portal/test/framework/container/http-runner-beans.xml 2007-08-18
12:07:24 UTC (rev 7988)
+++
modules/test/trunk/test/src/resources/portal-test-jar/org/jboss/portal/test/framework/container/http-runner-beans.xml 2007-08-18
20:05:32 UTC (rev 7989)
@@ -46,6 +46,20 @@
</property>
</bean>
+ <bean name="TestDriverServerLookup0"
class="org.jboss.portal.test.framework.server.ServiceLookup">
+ <constructor>
+
<parameter><value>portal.test:service=TestDriverServer</value></parameter>
+
<parameter><value>org.jboss.portal.test.framework.driver.http.HttpTestDriver</value></parameter>
+ </constructor>
+ </bean>
+
+ <bean name="TestAgentLookup0"
class="org.jboss.portal.test.framework.server.ServiceLookup">
+ <constructor>
+
<parameter><value>portal.test:service=Agent</value></parameter>
+
<parameter><value>org.jboss.portal.test.framework.agent.TestAgent</value></parameter>
+ </constructor>
+ </bean>
+
<bean name="MBeanServerFactory1"
class="org.jboss.portal.test.framework.jmx.MBeanServerFactory">
<property name="env">
<map class="java.util.Properties"
keyClass="java.lang.String" valueClass="java.lang.String">
@@ -65,6 +79,20 @@
</property>
</bean>
+ <bean name="TestDriverServerLookup1"
class="org.jboss.portal.test.framework.server.ServiceLookup">
+ <constructor>
+
<parameter><value>portal.test:service=TestDriverServer</value></parameter>
+
<parameter><value>org.jboss.portal.test.framework.driver.http.HttpTestDriver</value></parameter>
+ </constructor>
+ </bean>
+
+ <bean name="TestAgentLookup1"
class="org.jboss.portal.test.framework.server.ServiceLookup">
+ <constructor>
+
<parameter><value>portal.test:service=Agent</value></parameter>
+
<parameter><value>org.jboss.portal.test.framework.agent.TestAgent</value></parameter>
+ </constructor>
+ </bean>
+
<bean name="MBeanServerFactory2"
class="org.jboss.portal.test.framework.jmx.MBeanServerFactory">
<property name="env">
<map class="java.util.Properties"
keyClass="java.lang.String" valueClass="java.lang.String">
@@ -84,6 +112,20 @@
</property>
</bean>
+ <bean name="TestDriverServerLookup2"
class="org.jboss.portal.test.framework.server.ServiceLookup">
+ <constructor>
+
<parameter><value>portal.test:service=TestDriverServer</value></parameter>
+
<parameter><value>org.jboss.portal.test.framework.driver.http.HttpTestDriver</value></parameter>
+ </constructor>
+ </bean>
+
+ <bean name="TestAgentLookup2"
class="org.jboss.portal.test.framework.server.ServiceLookup">
+ <constructor>
+
<parameter><value>portal.test:service=Agent</value></parameter>
+
<parameter><value>org.jboss.portal.test.framework.agent.TestAgent</value></parameter>
+ </constructor>
+ </bean>
+
<bean name="Node0"
class="org.jboss.portal.test.framework.server.Node">
<constructor>
<parameter><value>default</value></parameter>
@@ -104,6 +146,18 @@
</entry>
</map>
</parameter>
+ <parameter>
+ <map keyClass="java.lang.String"
valueClass="org.jboss.portal.test.framework.server.ServiceLookup">
+ <entry>
+ <key>TestDriverServer</key>
+ <value><inject
bean="TestDriverServerLookup0"/></value>
+ </entry>
+ <entry>
+ <key>TestAgent</key>
+ <value><inject
bean="TestAgentLookup0"/></value>
+ </entry>
+ </map>
+ </parameter>
</constructor>
</bean>
@@ -127,6 +181,18 @@
</entry>
</map>
</parameter>
+ <parameter>
+ <map keyClass="java.lang.String"
valueClass="org.jboss.portal.test.framework.server.ServiceLookup">
+ <entry>
+ <key>TestDriverServer</key>
+ <value><inject
bean="TestDriverServerLookup1"/></value>
+ </entry>
+ <entry>
+ <key>TestAgent</key>
+ <value><inject
bean="TestAgentLookup1"/></value>
+ </entry>
+ </map>
+ </parameter>
</constructor>
</bean>
@@ -150,6 +216,18 @@
</entry>
</map>
</parameter>
+ <parameter>
+ <map keyClass="java.lang.String"
valueClass="org.jboss.portal.test.framework.server.ServiceLookup">
+ <entry>
+ <key>TestDriverServer</key>
+ <value><inject
bean="TestDriverServerLookup2"/></value>
+ </entry>
+ <entry>
+ <key>TestAgent</key>
+ <value><inject
bean="TestAgentLookup2"/></value>
+ </entry>
+ </map>
+ </parameter>
</constructor>
</bean>
@@ -158,18 +236,6 @@
</constructor>
</bean>
- <bean name="TestDriverServerLookup"
class="org.jboss.portal.test.framework.lookup.JNDIServiceLookup">
- <constructor>
- <parameter><value>TestDriverServer</value></parameter>
- </constructor>
- </bean>
-
- <bean name="TestAgentLookup"
class="org.jboss.portal.test.framework.lookup.JNDIServiceLookup">
- <constructor>
- <parameter><value>TestAgent</value></parameter>
- </constructor>
- </bean>
-
<bean name="NodeManager"
class="org.jboss.portal.test.framework.server.NodeManager">
<constructor>
<parameter>
@@ -183,7 +249,6 @@
</bean>
<bean name="Deployer"
class="org.jboss.portal.test.framework.deployment.Deployer">
- <property name="testAgentLookup"><inject
bean="TestAgentLookup"/></property>
</bean>
<bean name="TestBean"
class="org.jboss.portal.test.framework.runner.BaseRunner">
@@ -193,8 +258,6 @@
</constructor>
<property name="deployer"><inject
bean="Deployer"/></property>
<property name="nodeManager"><inject
bean="NodeManager"/></property>
- <property name="testAgentLookup"><inject
bean="TestAgentLookup"/></property>
- <property name="testDriverServerLookup"><inject
bean="TestDriverServerLookup"/></property>
<property name="testDriverClient"><inject
bean="TestDriverClient"/></property>
</bean>
</deployment>
Modified:
modules/test/trunk/test/src/resources/portal-test-jar/org/jboss/portal/test/framework/container/web-runner-beans.xml
===================================================================
---
modules/test/trunk/test/src/resources/portal-test-jar/org/jboss/portal/test/framework/container/web-runner-beans.xml 2007-08-18
12:07:24 UTC (rev 7988)
+++
modules/test/trunk/test/src/resources/portal-test-jar/org/jboss/portal/test/framework/container/web-runner-beans.xml 2007-08-18
20:05:32 UTC (rev 7989)
@@ -46,6 +46,20 @@
</property>
</bean>
+ <bean name="TestDriverServerLookup0"
class="org.jboss.portal.test.framework.server.ServiceLookup">
+ <constructor>
+
<parameter><value>portal.test:service=TestDriverServer</value></parameter>
+
<parameter><value>org.jboss.portal.test.framework.driver.http.HttpTestDriver</value></parameter>
+ </constructor>
+ </bean>
+
+ <bean name="TestAgentLookup0"
class="org.jboss.portal.test.framework.server.ServiceLookup">
+ <constructor>
+
<parameter><value>portal.test:service=Agent</value></parameter>
+
<parameter><value>org.jboss.portal.test.framework.agent.TestAgent</value></parameter>
+ </constructor>
+ </bean>
+
<bean name="MBeanServerFactory1"
class="org.jboss.portal.test.framework.jmx.MBeanServerFactory">
<property name="env">
<map class="java.util.Properties"
keyClass="java.lang.String" valueClass="java.lang.String">
@@ -65,6 +79,20 @@
</property>
</bean>
+ <bean name="TestDriverServerLookup1"
class="org.jboss.portal.test.framework.server.ServiceLookup">
+ <constructor>
+
<parameter><value>portal.test:service=TestDriverServer</value></parameter>
+
<parameter><value>org.jboss.portal.test.framework.driver.http.HttpTestDriver</value></parameter>
+ </constructor>
+ </bean>
+
+ <bean name="TestAgentLookup1"
class="org.jboss.portal.test.framework.server.ServiceLookup">
+ <constructor>
+
<parameter><value>portal.test:service=Agent</value></parameter>
+
<parameter><value>org.jboss.portal.test.framework.agent.TestAgent</value></parameter>
+ </constructor>
+ </bean>
+
<bean name="MBeanServerFactory2"
class="org.jboss.portal.test.framework.jmx.MBeanServerFactory">
<property name="env">
<map class="java.util.Properties"
keyClass="java.lang.String" valueClass="java.lang.String">
@@ -84,6 +112,20 @@
</property>
</bean>
+ <bean name="TestDriverServerLookup2"
class="org.jboss.portal.test.framework.server.ServiceLookup">
+ <constructor>
+
<parameter><value>portal.test:service=TestDriverServer</value></parameter>
+
<parameter><value>org.jboss.portal.test.framework.driver.http.HttpTestDriver</value></parameter>
+ </constructor>
+ </bean>
+
+ <bean name="TestAgentLookup2"
class="org.jboss.portal.test.framework.server.ServiceLookup">
+ <constructor>
+
<parameter><value>portal.test:service=Agent</value></parameter>
+
<parameter><value>org.jboss.portal.test.framework.agent.TestAgent</value></parameter>
+ </constructor>
+ </bean>
+
<bean name="Node0"
class="org.jboss.portal.test.framework.server.Node">
<constructor>
<parameter><value>default</value></parameter>
@@ -104,6 +146,18 @@
</entry>
</map>
</parameter>
+ <parameter>
+ <map keyClass="java.lang.String"
valueClass="org.jboss.portal.test.framework.server.ServiceLookup">
+ <entry>
+ <key>TestDriverServer</key>
+ <value><inject
bean="TestDriverServerLookup0"/></value>
+ </entry>
+ <entry>
+ <key>TestAgent</key>
+ <value><inject
bean="TestAgentLookup0"/></value>
+ </entry>
+ </map>
+ </parameter>
</constructor>
</bean>
@@ -127,6 +181,18 @@
</entry>
</map>
</parameter>
+ <parameter>
+ <map keyClass="java.lang.String"
valueClass="org.jboss.portal.test.framework.server.ServiceLookup">
+ <entry>
+ <key>TestDriverServer</key>
+ <value><inject
bean="TestDriverServerLookup1"/></value>
+ </entry>
+ <entry>
+ <key>TestAgent</key>
+ <value><inject
bean="TestAgentLookup1"/></value>
+ </entry>
+ </map>
+ </parameter>
</constructor>
</bean>
@@ -150,6 +216,18 @@
</entry>
</map>
</parameter>
+ <parameter>
+ <map keyClass="java.lang.String"
valueClass="org.jboss.portal.test.framework.server.ServiceLookup">
+ <entry>
+ <key>TestDriverServer</key>
+ <value><inject
bean="TestDriverServerLookup2"/></value>
+ </entry>
+ <entry>
+ <key>TestAgent</key>
+ <value><inject
bean="TestAgentLookup2"/></value>
+ </entry>
+ </map>
+ </parameter>
</constructor>
</bean>
@@ -158,18 +236,6 @@
</constructor>
</bean>
- <bean name="TestDriverServerLookup"
class="org.jboss.portal.test.framework.lookup.JNDIServiceLookup">
- <constructor>
- <parameter><value>TestDriverServer</value></parameter>
- </constructor>
- </bean>
-
- <bean name="TestAgentLookup"
class="org.jboss.portal.test.framework.lookup.JNDIServiceLookup">
- <constructor>
- <parameter><value>TestAgent</value></parameter>
- </constructor>
- </bean>
-
<bean name="NodeManager"
class="org.jboss.portal.test.framework.server.NodeManager">
<constructor>
<parameter>
@@ -183,7 +249,6 @@
</bean>
<bean name="Deployer"
class="org.jboss.portal.test.framework.deployment.Deployer">
- <property name="testAgentLookup"><inject
bean="TestAgentLookup"/></property>
</bean>
<bean name="TestBean"
class="org.jboss.portal.test.framework.runner.BaseRunner">
@@ -193,8 +258,6 @@
</constructor>
<property name="deployer"><inject
bean="Deployer"/></property>
<property name="nodeManager"><inject
bean="NodeManager"/></property>
- <property name="testAgentLookup"><inject
bean="TestAgentLookup"/></property>
- <property name="testDriverServerLookup"><inject
bean="TestDriverServerLookup"/></property>
<property name="testDriverClient"><inject
bean="TestDriverClient"/></property>
</bean>
</deployment>