[jboss-cvs] JBossAS SVN: r75161 - in trunk: cluster/src/etc and 17 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Jun 27 10:18:04 EDT 2008
Author: bstansberry at jboss.com
Date: 2008-06-27 10:18:04 -0400 (Fri, 27 Jun 2008)
New Revision: 75161
Added:
trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/profileservice/test/ProfileRepositoryHASingletonDeployerTestCase.java
trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/HASingletonDeployerTestCase.java
trunk/testsuite/src/resources/cluster/hasingleton/deployer/
trunk/testsuite/src/resources/cluster/hasingleton/deployer/test-deploy-hasingleton-beans.xml
trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/
trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/test-hasingleton/
trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/test-hasingleton/test-hasingleton-deployment-service.xml
trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/
trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/test-hasingleton/
trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/test-hasingleton/test-hasingleton-deployment-service.xml
trunk/testsuite/src/resources/test-configs/cluster-udp-0/
trunk/testsuite/src/resources/test-configs/cluster-udp-0/test-hasingleton/
trunk/testsuite/src/resources/test-configs/cluster-udp-0/test-hasingleton/test-hasingleton-deployment-service.xml
trunk/testsuite/src/resources/test-configs/cluster-udp-1/
trunk/testsuite/src/resources/test-configs/cluster-udp-1/test-hasingleton/
trunk/testsuite/src/resources/test-configs/cluster-udp-1/test-hasingleton/test-hasingleton-deployment-service.xml
Modified:
trunk/cluster/build.xml
trunk/cluster/src/etc/deploy-hasingleton-beans.xml
trunk/cluster/src/main/org/jboss/ha/singleton/HASingletonDeploymentScanner.java
trunk/testsuite/build.xml
trunk/testsuite/imports/sections/cluster.xml
trunk/testsuite/imports/server-config.xml
Log:
[JBAS-5686] Get HASingletonDeploymentScanner working
Modified: trunk/cluster/build.xml
===================================================================
--- trunk/cluster/build.xml 2008-06-27 14:12:59 UTC (rev 75160)
+++ trunk/cluster/build.xml 2008-06-27 14:18:04 UTC (rev 75161)
@@ -83,8 +83,9 @@
<path refid="jboss.jboss.ha.server.api.classpath"/>
<path refid="oswego.concurrent.classpath"/>
<path refid="jboss.remoting.classpath"/>
- <path refid="jboss.metadata.classpath"/>
- <path refid="jboss.jboss.deployers.classpath"/>
+ <path refid="jboss.metadata.classpath"/>
+ <path refid="jboss.jboss.deployers.classpath"/>
+ <path refid="jboss.jboss.man.classpath"/>
<path refid="jboss.jboss.mdr.classpath"/>
<path refid="jboss.microcontainer.classpath"/>
<path refid="jboss.integration.classpath"/>
Modified: trunk/cluster/src/etc/deploy-hasingleton-beans.xml
===================================================================
--- trunk/cluster/src/etc/deploy-hasingleton-beans.xml 2008-06-27 14:12:59 UTC (rev 75160)
+++ trunk/cluster/src/etc/deploy-hasingleton-beans.xml 2008-06-27 14:18:04 UTC (rev 75161)
@@ -19,7 +19,8 @@
<annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss:service=HASingletonDeploymentScanner,partition=${jboss.partition.name:DefaultPartition}", exposedInterface=org.jboss.ha.singleton.HASingletonDeploymentScannerMBean.class, registerDirectly=true)</annotation>
<property name="profileService"><inject bean="ProfileService"/></property>
- <property name="filterInstance"><inject bean="DeploymentFilter"/></property>
+ <property name="filterInstance"><inject bean="DeploymentFilter"/></property>
+ <property name="mainDeployer"><inject bean="MainDeployer"/></property>
</bean>
<!--
Modified: trunk/cluster/src/main/org/jboss/ha/singleton/HASingletonDeploymentScanner.java
===================================================================
--- trunk/cluster/src/main/org/jboss/ha/singleton/HASingletonDeploymentScanner.java 2008-06-27 14:12:59 UTC (rev 75160)
+++ trunk/cluster/src/main/org/jboss/ha/singleton/HASingletonDeploymentScanner.java 2008-06-27 14:18:04 UTC (rev 75161)
@@ -22,9 +22,20 @@
package org.jboss.ha.singleton;
import java.net.URI;
+import java.util.LinkedHashSet;
+import java.util.Set;
import java.util.StringTokenizer;
-import org.jboss.system.server.profileservice.VFSDeploymentScannerImpl;
+import org.jboss.deployers.client.spi.main.MainDeployer;
+import org.jboss.deployers.spi.management.deploy.DeploymentManager;
+import org.jboss.deployers.spi.management.deploy.DeploymentProgress;
+import org.jboss.deployers.vfs.spi.client.VFSDeployment;
+import org.jboss.managed.api.ManagedDeployment.DeploymentPhase;
+import org.jboss.profileservice.spi.Profile;
+import org.jboss.profileservice.spi.ProfileKey;
+import org.jboss.profileservice.spi.ProfileService;
+import org.jboss.system.server.profileservice.DeploymentPhaseVFSScanner;
+import org.jboss.virtual.VirtualFile;
/**
* VFSScanner that exposes methods whereby an HASingletonController
@@ -33,29 +44,208 @@
* @author <a href="brian.stansberry at jboss.com">Brian Stansberry</a>
* @version $Revision: 1.1 $
*/
-public class HASingletonDeploymentScanner extends VFSDeploymentScannerImpl implements HASingletonDeploymentScannerMBean
-{
- public void deploySingletons(String uris) throws Exception
+public class HASingletonDeploymentScanner extends DeploymentPhaseVFSScanner implements HASingletonDeploymentScannerMBean
+{
+ private static final DeploymentPhase DEPLOYMENT_PHASE = DeploymentPhase.APPLICATION;
+
+ private MainDeployer mainDeployer;
+
+ private DeploymentManager deploymentManager;
+
+ private boolean deployed;
+
+ private ProfileKey activeProfile;
+
+ private Set<String> uploadedNames = new LinkedHashSet<String>();
+
+ /**
+ * Create a new HASingletonDeploymentScanner.
+ *
+ */
+ public HASingletonDeploymentScanner()
{
- StringTokenizer tokenizer = new StringTokenizer(uris, ",");
- while (tokenizer.hasMoreTokens())
+ super(DEPLOYMENT_PHASE);
+ }
+
+ // ---------------------------------------------------------- Properties
+
+ public MainDeployer getMainDeployer()
+ {
+ return mainDeployer;
+ }
+
+ public void setMainDeployer(MainDeployer mainDeployer)
+ {
+ this.mainDeployer = mainDeployer;
+ }
+
+ @Override
+ public void setProfileService(ProfileService profileService)
+ {
+ super.setProfileService(profileService);
+ if (profileService != null)
{
- String uri = tokenizer.nextToken();
- uri = uri.trim();
- addURI(new URI(uri));
+ this.deploymentManager = profileService.getDeploymentManager();
}
- scan();
+ else
+ {
+ this.deploymentManager = null;
+ }
}
+
+ // ----------------------------------------------------------------- Public
- public void undeploySingletons(String uris) throws Exception
+ /**
+ * Deploy the content under the given URIs. Called by the
+ * HASingletonController when we become the singleton master.
+ *
+ * @param uris comma delimited list of URIs containing content to deploy
+ */
+ public synchronized void deploySingletons(String uris) throws Exception
{
- StringTokenizer tokenizer = new StringTokenizer(uris, ",");
- while (tokenizer.hasMoreTokens())
+ if (!this.deployed)
+ {
+ if (this.deploymentManager == null && this.mainDeployer == null)
+ {
+ throw new IllegalStateException("Configuration must either provide " +
+ "a ProfileService with a DeploymentManager or a MainDeployer");
+ }
+
+ StringTokenizer tokenizer = new StringTokenizer(uris, ",");
+ while (tokenizer.hasMoreTokens())
+ {
+ String uri = tokenizer.nextToken();
+ uri = uri.trim();
+ addURI(new URI(uri));
+ }
+
+ scan();
+
+ if (this.deploymentManager == null)
+ {
+ this.mainDeployer.process();
+ // We don't call mainDeployer.checkComplete() as we may be in the
+ // middle of the initial startup deployments; i.e. not expected to be complete
+ }
+ else
+ {
+ String[] allUploaded = getAllUploadedNames();
+ DeploymentProgress progress = this.deploymentManager.start(DEPLOYMENT_PHASE, allUploaded);
+ progress.run();
+ }
+
+ this.deployed = true;
+ }
+ }
+
+ /**
+ * Undeploy the content under the given URIs. Called by the
+ * HASingletonController when we are no longer the singleton master.
+ *
+ * @param uris comma delimited list of URIs containing content to deploy
+ */
+ public synchronized void undeploySingletons(String uris) throws Exception
+ {
+ if (this.deployed)
+ {
+ if (this.deploymentManager == null && this.mainDeployer == null)
+ {
+ throw new IllegalStateException("Configuration must either provide " +
+ "a ProfileService with a DeploymentManager or a MainDeployer");
+ }
+
+ StringTokenizer tokenizer = new StringTokenizer(uris, ",");
+ while (tokenizer.hasMoreTokens())
+ {
+ String uri = tokenizer.nextToken();
+ uri = uri.trim();
+ removeURI(new URI(uri));
+ }
+
+ scan();
+
+ if (this.deploymentManager == null)
+ {
+ this.mainDeployer.process();
+ // We don't call mainDeployer.checkComplete() as we may be in the
+ // middle of the main shutdown startup deployments; i.e. not expected to be complete
+ }
+ else
+ {
+ String[] allUploaded = getAllUploadedNames();
+
+ this.uploadedNames.clear();
+
+ DeploymentProgress progress = this.deploymentManager.stop(DEPLOYMENT_PHASE, allUploaded);
+ progress.run();
+ progress = this.deploymentManager.undeploy(DEPLOYMENT_PHASE, allUploaded);
+ progress.run();
+ }
+
+ this.deployed = false;
+ }
+ }
+
+ // ---------------------------------------------------- Protected Overrides
+
+ @Override
+ protected VFSDeployment add(Profile profile, VirtualFile file) throws Exception
+ {
+ VFSDeployment deployment = createDeployment(file);
+ if (this.deploymentManager == null)
+ {
+ if(profile.hasDeployment(deployment.getName(), DEPLOYMENT_PHASE) == false)
+ {
+ profile.addDeployment(deployment, DEPLOYMENT_PHASE);
+ this.mainDeployer.addDeployment(deployment);
+ }
+ }
+ else
{
- String uri = tokenizer.nextToken();
- uri = uri.trim();
- removeURI(new URI(uri));
+ activateProfile(profile.getKey());
+
+ String name = file.getPathName();
+ DeploymentProgress progress = this.deploymentManager.distribute(name, DEPLOYMENT_PHASE, file.toURL());
+ progress.run();
+
+ String[] repoNames = progress.getDeploymentID().getRepositoryNames();
+ if (repoNames != null)
+ {
+ for (String repoName : repoNames)
+ {
+ uploadedNames.add(repoName);
+ }
+ }
+ }
+ return deployment;
+ }
+
+ @Override
+ protected void remove(Profile profile, String name) throws Exception
+ {
+ if(this.deploymentManager == null && profile.hasDeployment(name, DEPLOYMENT_PHASE))
+ {
+ profile.removeDeployment(name, DEPLOYMENT_PHASE);
+ this.mainDeployer.removeDeployment(name);
+ }
+ // else we deal with everything at the end of undeploySingletons
+ }
+
+ // ---------------------------------------------------------------- Private
+
+ private void activateProfile(ProfileKey key) throws Exception
+ {
+ if (activeProfile != key)
+ {
+ this.deploymentManager.loadProfile(key);
+ activeProfile = key;
}
- scan();
}
+
+ private String[] getAllUploadedNames()
+ {
+ String[] result = new String[this.uploadedNames.size()];
+ return this.uploadedNames.toArray(result);
+ }
+
}
Modified: trunk/testsuite/build.xml
===================================================================
--- trunk/testsuite/build.xml 2008-06-27 14:12:59 UTC (rev 75160)
+++ trunk/testsuite/build.xml 2008-06-27 14:18:04 UTC (rev 75161)
@@ -846,6 +846,8 @@
<exclude name="org/jboss/test/deployers/ear/test/EmbeddedDatasourceUnitTestCase.class"/>
<!-- Test of old farming implementation -->
<exclude name="org/jboss/test/cluster/multicfg/test/ClusterFileTransferTestCase.class"/>
+ <!-- Unfinished test of clustered deployment via profile service -->
+ <exclude name="org/jboss/test/cluster/defaultcfg/profileservice/test/ClusteredDeployUnitTestCase.class"/>
</patternset>
<patternset id="jbossmq.excludes">
Modified: trunk/testsuite/imports/sections/cluster.xml
===================================================================
--- trunk/testsuite/imports/sections/cluster.xml 2008-06-27 14:12:59 UTC (rev 75160)
+++ trunk/testsuite/imports/sections/cluster.xml 2008-06-27 14:18:04 UTC (rev 75161)
@@ -83,6 +83,11 @@
<include name="META-INF/*.xml"/>
</fileset>
</jar>
+
+ <!--beans for testing HASingletonDeployerTestCase -->
+ <copy todir="${build.lib}"
+ file="${build.resources}/cluster/hasingleton/deployer/test-deploy-hasingleton-beans.xml"
+ overwrite="true"/>
<!--beans for testing HASingletonElectionPolicy -->
<copy todir="${build.lib}"
Modified: trunk/testsuite/imports/server-config.xml
===================================================================
--- trunk/testsuite/imports/server-config.xml 2008-06-27 14:12:59 UTC (rev 75160)
+++ trunk/testsuite/imports/server-config.xml 2008-06-27 14:18:04 UTC (rev 75161)
@@ -809,6 +809,10 @@
<include name="lib/**"/>
</fileset>
</copy>
+ <echo message="Overwriting config descriptors" />
+ <copy todir="${jboss.dist}/server/@{conf}" overwrite="true" failonerror="false">
+ <fileset dir="${build.resources}/test-configs/@{conf}" />
+ </copy>
</sequential>
</macrodef>
Added: trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/profileservice/test/ProfileRepositoryHASingletonDeployerTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/profileservice/test/ProfileRepositoryHASingletonDeployerTestCase.java (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/profileservice/test/ProfileRepositoryHASingletonDeployerTestCase.java 2008-06-27 14:18:04 UTC (rev 75161)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.test.cluster.defaultcfg.profileservice.test;
+
+import junit.framework.Test;
+
+import org.jboss.test.cluster.defaultcfg.test.HASingletonDeployerTestCase;
+
+/**
+ * @author Brian Stansberry
+ *
+ */
+public class ProfileRepositoryHASingletonDeployerTestCase extends HASingletonDeployerTestCase
+{
+ /**
+ * Create a new ProfileRepositoryHASingletonDeployerTestCase.
+ *
+ * @param name
+ */
+ public ProfileRepositoryHASingletonDeployerTestCase(String name)
+ {
+ super(name);
+ }
+
+ public static Test suite() throws Exception
+ {
+ return getDeploySetup(ProfileRepositoryHASingletonDeployerTestCase.class, SINGLETON_DEPLOYER);
+ }
+
+}
Added: trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/HASingletonDeployerTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/HASingletonDeployerTestCase.java (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/HASingletonDeployerTestCase.java 2008-06-27 14:18:04 UTC (rev 75161)
@@ -0,0 +1,99 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.test.cluster.defaultcfg.test;
+
+import javax.management.MBeanServerConnection;
+import javax.management.ObjectName;
+
+import junit.framework.Test;
+
+import org.jboss.test.JBossClusteredTestCase;
+
+/**
+ * @author Brian Stansberry
+ *
+ */
+public class HASingletonDeployerTestCase extends JBossClusteredTestCase
+{
+ public static final String SINGLETON_DEPLOYMENT = "jboss.system:service=HASingletonTestThreadPool";
+ public static final String SINGLETON_DEPLOYER = "test-deploy-hasingleton-beans.xml";
+
+ /**
+ * Create a new ProfileRepositoryHASingletonDeployerTestCase.
+ *
+ * @param name
+ */
+ public HASingletonDeployerTestCase(String name)
+ {
+ super(name);
+ }
+
+ public static Test suite() throws Exception
+ {
+ return getDeploySetup(HASingletonDeployerTestCase.class, SINGLETON_DEPLOYER);
+ }
+
+ public void testHASingletonDeployer() throws Exception
+ {
+ MBeanServerConnection[] adaptors = getAdaptors();
+
+ assertTrue(isDeployed(SINGLETON_DEPLOYMENT, adaptors[0]));
+ assertFalse(isDeployed(SINGLETON_DEPLOYMENT, adaptors[1]));
+
+ undeploy(adaptors[0], SINGLETON_DEPLOYER);
+
+ // The singleton is triggered asynchronously, so give it time to work
+ sleep(1000);
+
+ assertTrue(isDeployed(SINGLETON_DEPLOYMENT, adaptors[1]));
+ assertFalse(isDeployed(SINGLETON_DEPLOYMENT, adaptors[0]));
+
+ undeploy(adaptors[1], SINGLETON_DEPLOYER);
+
+ sleep(1000);
+
+ assertFalse(isDeployed(SINGLETON_DEPLOYMENT, adaptors[0]));
+ assertFalse(isDeployed(SINGLETON_DEPLOYMENT, adaptors[1]));
+
+ deploy(adaptors[1], SINGLETON_DEPLOYER);
+
+ sleep(1000);
+
+ assertTrue(isDeployed(SINGLETON_DEPLOYMENT, adaptors[1]));
+ assertFalse(isDeployed(SINGLETON_DEPLOYMENT, adaptors[0]));
+
+ deploy(adaptors[0], SINGLETON_DEPLOYER);
+
+ sleep(1000);
+
+ // per policy, node0 takes over as master
+ assertTrue(isDeployed(SINGLETON_DEPLOYMENT, adaptors[0]));
+ assertFalse(isDeployed(SINGLETON_DEPLOYMENT, adaptors[1]));
+ }
+
+ protected boolean isDeployed(String deployment, MBeanServerConnection server) throws Exception
+ {
+ return server.isRegistered(new ObjectName(deployment));
+ }
+
+}
Added: trunk/testsuite/src/resources/cluster/hasingleton/deployer/test-deploy-hasingleton-beans.xml
===================================================================
--- trunk/testsuite/src/resources/cluster/hasingleton/deployer/test-deploy-hasingleton-beans.xml (rev 0)
+++ trunk/testsuite/src/resources/cluster/hasingleton/deployer/test-deploy-hasingleton-beans.xml 2008-06-27 14:18:04 UTC (rev 75161)
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+<!-- ===================================================================== -->
+<!-- -->
+<!-- This service ensures that exactly one node in the cluster -->
+<!-- deploys the services under "test-hasingleton" -->
+<!-- -->
+<!-- ===================================================================== -->
+
+ <bean name="TestHASingletonDeploymentScanner" class="org.jboss.ha.singleton.HASingletonDeploymentScanner">
+
+ <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss:service=TestHASingletonDeploymentScanner,partition=${jboss.partition.name:DefaultPartition}", exposedInterface=org.jboss.ha.singleton.HASingletonDeploymentScannerMBean.class, registerDirectly=true)</annotation>
+
+ <property name="profileService"><inject bean="ProfileService"/></property>
+ <property name="filterInstance"><inject bean="DeploymentFilter"/></property>
+ <property name="mainDeployer"><inject bean="MainDeployer"/></property>
+ </bean>
+
+ <bean name="TestHASingletonDeployer"
+ class="org.jboss.ha.singleton.HASingletonController">
+
+ <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.ha:service=TestHASingletonDeployer", exposedInterface=org.jboss.ha.singleton.HASingletonControllerMBean.class, registerDirectly=true)</annotation>
+
+ <depends>HAPartition</depends>
+
+ <property name="HAPartition"><inject bean="HAPartition"/></property>
+ <property name="target"><inject bean="TestHASingletonDeploymentScanner"/></property>
+ <property name="targetStartMethod">deploySingletons</property>
+ <property name="targetStartMethodArgument">${jboss.server.home.url}test-hasingleton</property>
+ <property name="targetStopMethod">undeploySingletons</property>
+ <property name="targetStopMethodArgument">${jboss.server.home.url}test-hasingleton</property>
+
+ <!-- whether to register thread context classloader for the RPC handler, default is false -->
+ <!--<property name="registerThreadContextClassLoader">false</property>-->
+
+ <!-- Whether the singleton should be restarted (i.e. invoke the TargetStopMethod and then the
+ TargetStartMethod) if a cluster merge occurs while this node is the singleton master.
+ A cluster merge means there may have been more than one singleton master during the period
+ when communication between some or all of the nodes in the cluster was disrupted; hence the
+ surviving master may not be aware of state changes made by another master. Restarting the
+ singleton gives it a signal that it should refresh its internal state from any external
+ store.
+ By default this is set to true.
+ -->
+ <property name="restartOnMerge">true</property>
+
+ </bean>
+
+</deployment>
Added: trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/test-hasingleton/test-hasingleton-deployment-service.xml
===================================================================
--- trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/test-hasingleton/test-hasingleton-deployment-service.xml (rev 0)
+++ trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/test-hasingleton/test-hasingleton-deployment-service.xml 2008-06-27 14:18:04 UTC (rev 75161)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<server>
+
+ <!-- A Thread pool service -->
+ <mbean code="org.jboss.util.threadpool.BasicThreadPool"
+ name="jboss.system:service=HASingletonTestThreadPool">
+ <attribute name="Name">HASingletonTest Threads</attribute>
+ <attribute name="ThreadGroupName">HASingletonTest Threads</attribute>
+ <!-- How long a thread will live without any tasks in MS -->
+ <attribute name="KeepAliveTime">1000</attribute>
+ <!-- The max number of threads in the pool -->
+ <attribute name="MaximumPoolSize">1</attribute>
+ <!-- The max number of tasks before the queue is full -->
+ <attribute name="MaximumQueueSize">10</attribute>
+ <!-- The behavior of the pool when a task is added and the queue is full.
+ abort - a RuntimeException is thrown
+ run - the calling thread executes the task
+ wait - the calling thread blocks until the queue has room
+ discard - the task is silently discarded without being run
+ discardOldest - check to see if a task is about to complete and enque
+ the new task if possible, else run the task in the calling thread
+ -->
+ <attribute name="BlockingMode">abort</attribute>
+ </mbean>
+
+</server>
Added: trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/test-hasingleton/test-hasingleton-deployment-service.xml
===================================================================
--- trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/test-hasingleton/test-hasingleton-deployment-service.xml (rev 0)
+++ trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/test-hasingleton/test-hasingleton-deployment-service.xml 2008-06-27 14:18:04 UTC (rev 75161)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<server>
+
+ <!-- A Thread pool service -->
+ <mbean code="org.jboss.util.threadpool.BasicThreadPool"
+ name="jboss.system:service=HASingletonTestThreadPool">
+ <attribute name="Name">HASingletonTest Threads</attribute>
+ <attribute name="ThreadGroupName">HASingletonTest Threads</attribute>
+ <!-- How long a thread will live without any tasks in MS -->
+ <attribute name="KeepAliveTime">1000</attribute>
+ <!-- The max number of threads in the pool -->
+ <attribute name="MaximumPoolSize">1</attribute>
+ <!-- The max number of tasks before the queue is full -->
+ <attribute name="MaximumQueueSize">10</attribute>
+ <!-- The behavior of the pool when a task is added and the queue is full.
+ abort - a RuntimeException is thrown
+ run - the calling thread executes the task
+ wait - the calling thread blocks until the queue has room
+ discard - the task is silently discarded without being run
+ discardOldest - check to see if a task is about to complete and enque
+ the new task if possible, else run the task in the calling thread
+ -->
+ <attribute name="BlockingMode">abort</attribute>
+ </mbean>
+
+</server>
Added: trunk/testsuite/src/resources/test-configs/cluster-udp-0/test-hasingleton/test-hasingleton-deployment-service.xml
===================================================================
--- trunk/testsuite/src/resources/test-configs/cluster-udp-0/test-hasingleton/test-hasingleton-deployment-service.xml (rev 0)
+++ trunk/testsuite/src/resources/test-configs/cluster-udp-0/test-hasingleton/test-hasingleton-deployment-service.xml 2008-06-27 14:18:04 UTC (rev 75161)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<server>
+
+ <!-- A Thread pool service -->
+ <mbean code="org.jboss.util.threadpool.BasicThreadPool"
+ name="jboss.system:service=HASingletonTestThreadPool">
+ <attribute name="Name">HASingletonTest Threads</attribute>
+ <attribute name="ThreadGroupName">HASingletonTest Threads</attribute>
+ <!-- How long a thread will live without any tasks in MS -->
+ <attribute name="KeepAliveTime">1000</attribute>
+ <!-- The max number of threads in the pool -->
+ <attribute name="MaximumPoolSize">1</attribute>
+ <!-- The max number of tasks before the queue is full -->
+ <attribute name="MaximumQueueSize">10</attribute>
+ <!-- The behavior of the pool when a task is added and the queue is full.
+ abort - a RuntimeException is thrown
+ run - the calling thread executes the task
+ wait - the calling thread blocks until the queue has room
+ discard - the task is silently discarded without being run
+ discardOldest - check to see if a task is about to complete and enque
+ the new task if possible, else run the task in the calling thread
+ -->
+ <attribute name="BlockingMode">abort</attribute>
+ </mbean>
+
+</server>
Added: trunk/testsuite/src/resources/test-configs/cluster-udp-1/test-hasingleton/test-hasingleton-deployment-service.xml
===================================================================
--- trunk/testsuite/src/resources/test-configs/cluster-udp-1/test-hasingleton/test-hasingleton-deployment-service.xml (rev 0)
+++ trunk/testsuite/src/resources/test-configs/cluster-udp-1/test-hasingleton/test-hasingleton-deployment-service.xml 2008-06-27 14:18:04 UTC (rev 75161)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<server>
+
+ <!-- A Thread pool service -->
+ <mbean code="org.jboss.util.threadpool.BasicThreadPool"
+ name="jboss.system:service=HASingletonTestThreadPool">
+ <attribute name="Name">HASingletonTest Threads</attribute>
+ <attribute name="ThreadGroupName">HASingletonTest Threads</attribute>
+ <!-- How long a thread will live without any tasks in MS -->
+ <attribute name="KeepAliveTime">1000</attribute>
+ <!-- The max number of threads in the pool -->
+ <attribute name="MaximumPoolSize">1</attribute>
+ <!-- The max number of tasks before the queue is full -->
+ <attribute name="MaximumQueueSize">10</attribute>
+ <!-- The behavior of the pool when a task is added and the queue is full.
+ abort - a RuntimeException is thrown
+ run - the calling thread executes the task
+ wait - the calling thread blocks until the queue has room
+ discard - the task is silently discarded without being run
+ discardOldest - check to see if a task is about to complete and enque
+ the new task if possible, else run the task in the calling thread
+ -->
+ <attribute name="BlockingMode">abort</attribute>
+ </mbean>
+
+</server>
More information about the jboss-cvs-commits
mailing list