[jboss-cvs] JBossAS SVN: r86554 - in trunk/testsuite/src: resources/test-configs/cluster-profilesvc-0 and 24 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Mar 31 18:11:55 EDT 2009


Author: bstansberry at jboss.com
Date: 2009-03-31 18:11:55 -0400 (Tue, 31 Mar 2009)
New Revision: 86554

Added:
   trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/profileservice/test/FarmedClusterStartupTestCase.java
   trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/conf/
   trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/conf/bootstrap/
   trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/conf/bootstrap/profile.xml
   trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/data/
   trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/data/farm-repository-contents.xml
   trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/deploy-hasingleton/
   trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/deploy-hasingleton/hasingleton-deployment-service.xml
   trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/deploy/
   trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/deploy/cluster/
   trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/deploy/cluster/deploy-hasingleton-jboss-beans.xml
   trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/deploy/cluster/farm-deployment-jboss-beans.xml
   trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/farm/
   trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/farm/farmA.war/
   trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/farm/farmA.war/WEB-INF/
   trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/farm/farmA.war/WEB-INF/web.xml
   trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/farm/farmA.war/index.html
   trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/farm/farmC.war/
   trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/farm/farmC.war/WEB-INF/
   trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/farm/farmC.war/WEB-INF/web.xml
   trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/farm/farmC.war/index.html
   trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/farm/farmC.war/node0.html
   trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/farm/node0-farm-deployment-service.xml
   trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/conf/
   trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/conf/bootstrap/
   trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/conf/bootstrap/profile.xml
   trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/deploy-hasingleton/
   trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/deploy-hasingleton/hasingleton-deployment-service.xml
   trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/deploy/
   trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/deploy/cluster/
   trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/deploy/cluster/deploy-hasingleton-jboss-beans.xml
   trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/deploy/cluster/farm-deployment-jboss-beans.xml
   trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/farm/
   trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/farm/farmB.war/
   trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/farm/farmB.war/WEB-INF/
   trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/farm/farmB.war/WEB-INF/web.xml
   trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/farm/farmB.war/index.html
   trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/farm/farmC.war/
   trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/farm/farmC.war/WEB-INF/
   trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/farm/farmC.war/WEB-INF/web.xml
   trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/farm/farmC.war/index.html
   trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/farm/farmC.war/node1.html
   trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/farm/farmD.war/
   trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/farm/farmD.war/WEB-INF/
   trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/farm/farmD.war/WEB-INF/web.xml
   trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/farm/farmD.war/index.html
   trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/farm/node1-farm-deployment-service.xml
Log:
[JBAS-5552] Test bootstrap synchronization of ClusteredDeploymentRepository

Added: trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/profileservice/test/FarmedClusterStartupTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/profileservice/test/FarmedClusterStartupTestCase.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/profileservice/test/FarmedClusterStartupTestCase.java	2009-03-31 22:11:55 UTC (rev 86554)
@@ -0,0 +1,111 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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 java.io.IOException;
+import java.net.HttpURLConnection;
+
+import javax.management.MBeanServerConnection;
+import javax.management.ObjectName;
+
+import org.apache.commons.httpclient.HttpClient;
+import org.apache.commons.httpclient.HttpException;
+import org.apache.commons.httpclient.methods.GetMethod;
+import org.jboss.test.JBossClusteredTestCase;
+
+/**
+ * Tests that a pair of servers started with farming configured end
+ * up with the expected set of farm deployments.
+ *
+ * @author Brian Stansberry
+ * 
+ * @version $Revision: $
+ */
+public class FarmedClusterStartupTestCase extends JBossClusteredTestCase
+{
+
+   /**
+    * Create a new FarmedClusterStartupTestCase.
+    * 
+    * @param name
+    */
+   public FarmedClusterStartupTestCase(String name)
+   {
+      super(name);
+   }
+
+   public void testNode0FarmTestThreadPool() throws Exception
+   {
+      MBeanServerConnection[] adaptors = getAdaptors();
+      ObjectName oname = new ObjectName("jboss.system:service=Node0FarmTestThreadPool");
+      assertEquals("Node0FarmThreadPool", adaptors[0].getAttribute(oname, "Name"));
+      assertEquals("Node0FarmThreadPool", adaptors[1].getAttribute(oname, "Name"));
+   }
+
+   public void testNode1FarmTestThreadPool() throws Exception
+   {
+      MBeanServerConnection[] adaptors = getAdaptors();
+      ObjectName oname = new ObjectName("jboss.system:service=Node1FarmTestThreadPool");
+      assertEquals("Node1FarmThreadPool", adaptors[0].getAttribute(oname, "Name"));
+      assertEquals("Node1FarmThreadPool", adaptors[1].getAttribute(oname, "Name"));      
+   }
+   
+   public void testFarmAWar() throws Exception
+   {
+      checkAvailable("/farmA/index.html");
+   }
+   
+   public void testFarmBWar() throws Exception
+   {
+      checkAvailable("/farmB/index.html");      
+   }
+   
+   public void testFarmCWar() throws Exception
+   {
+      checkAvailable("/farmC/index.html"); 
+      checkAvailable("/farmC/node0.html"); 
+      checkAvailable("/farmC/node1.html"); 
+   }
+   
+   public void testFarmDWar() throws Exception
+   {
+      String index = "/farmD/index.html";
+
+      HttpClient client = new HttpClient();
+
+      GetMethod get = new GetMethod(getHttpURLs()[0] +index);
+      assertEquals("farmD is unavailable on node0", HttpURLConnection.HTTP_NOT_FOUND, client.executeMethod(get));
+      get = new GetMethod(getHttpURLs()[1] +index);
+      assertEquals("farmD is unavailable on node0", HttpURLConnection.HTTP_NOT_FOUND, client.executeMethod(get));
+   }
+
+   private void checkAvailable(String url) throws Exception, IOException, HttpException
+   {
+      HttpClient client = new HttpClient();
+
+      GetMethod get = new GetMethod(getHttpURLs()[0] +url);
+      assertEquals(url + " is available on node0", HttpURLConnection.HTTP_OK, client.executeMethod(get));
+      get = new GetMethod(getHttpURLs()[1] +url);
+      assertEquals(url + " is available on node0", HttpURLConnection.HTTP_OK, client.executeMethod(get));
+   }
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/profileservice/test/FarmedClusterStartupTestCase.java
___________________________________________________________________
Name: svn:keywords
   + 

Added: trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/conf/bootstrap/profile.xml
===================================================================
--- trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/conf/bootstrap/profile.xml	                        (rev 0)
+++ trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/conf/bootstrap/profile.xml	2009-03-31 22:11:55 UTC (rev 86554)
@@ -0,0 +1,149 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- 
+	The ProfileService.
+-->
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+	<classloader><inject bean="profile-classloader:0.0.0" /></classloader>
+
+	<classloader name="profile-classloader" xmlns="urn:jboss:classloader:1.0" export-all="NON_EMPTY" import-all="true">
+		<root>${jboss.lib.url}jboss-profileservice-spi.jar</root>
+	</classloader>
+
+	<!-- 
+		The profile configuration
+		This contains required properties:
+			The uri to jboss-service.xml.
+			The uri to the deployers folder.
+			A list of uris to deploy folders. -->
+	<bean name="BootstrapProfileFactory" class="org.jboss.system.server.profileservice.StaticClusteredProfileFactory">
+		<property name="bootstrapURI">${jboss.server.home.url}conf/jboss-service.xml</property>
+		<property name="deployersURI">${jboss.server.home.url}deployers</property>
+		<property name="applicationURIs">
+			<list elementClass="java.net.URI">
+				<value>${jboss.server.home.url}deploy</value>
+			</list>
+		</property>
+      <property name="farmURIs">
+         <list elementClass="java.net.URI">
+            <value>${jboss.server.home.url}farm</value>
+         </list>
+      </property>
+		<property name="attachmentStoreRoot">${jboss.server.data.dir}/attachments</property>
+		<property name="profileFactory"><inject bean="ProfileFactory" /></property>
+	</bean>
+	
+	<!--  The default profile key -->
+	<bean name="DefaultProfileKey" class="org.jboss.profileservice.spi.ProfileKey">
+		<constructor><parameter>${jboss.server.name}</parameter></constructor>
+	</bean>
+
+	<!-- The ProfileService -->
+	<bean name="ProfileService" class="org.jboss.system.server.profileservice.repository.AbstractProfileService">
+		<constructor><parameter><inject bean="jboss.kernel:service=KernelController" /></parameter></constructor>
+		<property name="deployer"><inject bean="ProfileServiceDeployer" /></property>
+		<property name="defaultProfile"><inject bean="DefaultProfileKey" /></property>
+	</bean>
+
+	<!-- The Bootstrap implementation that loads the Profile from the ProfileService -->
+	<bean name="ProfileServiceBootstrap" class="org.jboss.system.server.profileservice.ProfileServiceBootstrap">
+		<property name="profileKey"><inject bean="DefaultProfileKey" /></property>
+		<property name="mainDeployer"><inject bean="MainDeployer" /></property>
+		<property name="profileService"><inject bean="ProfileService" /></property>
+		<property name="mof"><inject bean="ManagedObjectFactory" /></property>
+		<property name="mgtDeploymentCreator"><inject bean="ManagedDeploymentCreator" /></property>
+		<property name="bootstrapProfileFactory"><inject bean="BootstrapProfileFactory" /></property>
+	</bean>
+
+	<!-- The profile factory -->
+	<bean name="ProfileFactory" class="org.jboss.system.server.profileservice.repository.AbstractProfileFactory">
+		<property name="profileRepository"><inject bean="ProfileRepositoryFactory" /></property>
+	</bean>
+
+	<!-- The profile repository factory -->
+	<bean name="ProfileRepositoryFactory" class="org.jboss.system.server.profileservice.repository.TypedProfileRepository">
+		<!-- Accept any DeploymentRepositoryFactory -->
+		<incallback method="addRepositoryFactory" />
+		<uncallback method="removeRepositoryFactory" />
+	</bean>
+
+  <!-- The structure modification cache and checker -->
+
+  <bean name="StructureModCache" class="org.jboss.deployers.vfs.spi.structure.modified.DefaultStructureCache">
+    <destroy method="flush"/>
+  </bean>
+
+  <bean name="StructureModificationChecker" class="org.jboss.deployers.vfs.spi.structure.modified.MetaDataStructureModificationChecker">
+    <constructor>
+      <parameter><inject bean="MainDeployer" /></parameter>
+    </constructor>
+    <property name="cache"><inject bean="StructureModCache" /></property>
+    <property name="filter"><bean class="org.jboss.system.server.profile.basic.XmlIncludeVirtualFileFilter" /></property>
+  </bean>
+
+	<!-- The default deployment repository factory -->
+	<bean name="DefaultDeploymentRepositoryFactory" class="org.jboss.system.server.profileservice.repository.DefaultDeploymentRepositoryFactory">
+		<property name="deploymentFilter"><inject bean="DeploymentFilter" /></property>
+		<property name="checker"><inject bean="StructureModificationChecker" /></property>
+	</bean>
+
+   <!-- The clustered deployment repository factory -->
+   <bean name="ClusteredDeploymentRepositoryFactory" class="org.jboss.system.server.profileservice.repository.clustered.ClusteredDeploymentRepositoryFactory">
+      <property name="deploymentFilter"><inject bean="DeploymentFilter" /></property>
+      <property name="checker"><inject bean="StructureModificationChecker" /></property>
+      <!-- Accept any RepositoryClusteringHandler -->
+      <incallback method="addRepositoryClusteringHandler" />
+      <uncallback method="removeRepositoryClusteringHandler" />
+      <!-- Accept any LocalContentManagerFactory -->
+      <incallback method="addLocalContentManagerFactory" />
+      <uncallback method="removeLocalContentManagerFactory" />
+   </bean>
+   
+   <!--  Handles persistence of metadata about clustered DeploymentRepository content -->
+   <bean name="ClusteredDeploymentRepositoryMetadataPersister"
+         class="org.jboss.system.server.profileservice.repository.clustered.local.JAXBRepositoryContentMetadataPersister">
+      <constructor>
+         <!-- Here we use the constructor version that takes the Server impl and 
+              uses it to find the data dir. You could alternatively use a version 
+              that takes a URI or a File. -->
+         <parameter><inject bean="JBossServer"/></parameter>
+      </constructor>
+   </bean>
+         
+   <!--  Factory for manager of local persistence of clustered DeploymentRepository content -->
+   <bean name="FilesystemLocalContentManagerFactory" 
+         class="org.jboss.system.server.profileservice.repository.clustered.local.file.FilesystemLocalContentManagerFactory">
+      <property name="metadataPersister"><inject bean="ClusteredDeploymentRepositoryMetadataPersister"/></property>
+      <property name="tempDirURI">${jboss.server.home.url}temp${/}cluster-repo</property>
+   </bean>
+
+	<!-- The attachment store -->
+	<bean name="AttachmentStore" class="org.jboss.system.server.profileservice.repository.AbstractAttachmentStore">
+		<constructor><parameter><inject bean="BootstrapProfileFactory" property="attachmentStoreRoot" /></parameter></constructor>
+		<property name="mainDeployer"><inject bean="MainDeployer" /></property>
+		<property name="serializer"><inject bean="AttachmentsSerializer" /></property>
+	</bean>
+
+	<bean name="AttachmentsSerializer" class="org.jboss.system.server.profileservice.repository.JAXBAttachmentSerializer">
+		<constructor><parameter><inject bean="BootstrapProfileFactory" property="attachmentStoreRoot" /></parameter></constructor>
+	</bean>
+
+	<bean name="ProfileServiceDeployer" class="org.jboss.system.server.profileservice.repository.MainDeployerAdapter">
+		<property name="mainDeployer"><inject bean="MainDeployer" /></property>
+		<property name="attachmentStore"><inject bean="AttachmentStore" /></property>
+	</bean>
+
+   <bean name="ProfileServicePersistenceDeployer" class="org.jboss.system.server.profileservice.persistence.deployer.ProfileServicePersistenceDeployer" />
+
+	<!-- A filter for excluding files from the scanner -->
+	<bean name="DeploymentFilter" class="org.jboss.virtual.plugins.vfs.helpers.ExtensibleFilter">
+		<!-- Files starting with theses strings are ignored -->
+		<property name="prefixes">#,%,\,,.,_$</property>
+		<!-- Files ending with theses strings are ignored -->
+		<property name="suffixes">#,$,%,~,\,v,.BAK,.bak,.old,.orig,.tmp,.rej,.sh</property>
+		<!-- Files matching with theses strings are ignored -->
+		<property name="matches">.make.state,.nse_depinfo,CVS,CVS.admin,RCS,RCSLOG,SCCS,TAGS,core,tags</property>
+	</bean>
+
+</deployment>
\ No newline at end of file


Property changes on: trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/conf/bootstrap/profile.xml
___________________________________________________________________
Name: svn:keywords
   + 

Added: trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/data/farm-repository-contents.xml
===================================================================
--- trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/data/farm-repository-contents.xml	                        (rev 0)
+++ trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/data/farm-repository-contents.xml	2009-03-31 22:11:55 UTC (rev 86554)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<repository-content domain="default" server="default" name="farm">
+    <repository-root name="farm">
+        <content relative-path="farmA.war/" directory="true" removed="false" originator="127.0.0.1:1099" timestamp="2009-03-30T21:38:53.000-0500"/>
+        <content relative-path="farmA.war/WEB-INF/" directory="true" removed="false" originator="127.0.0.1:1099" timestamp="2009-03-30T21:38:53.000-0500"/>
+        <content relative-path="farmA.war/WEB-INF/web.xml" directory="false" removed="false" originator="127.0.0.1:1099" timestamp="2009-03-30T21:38:53.000-0500"/>
+        <content relative-path="farmA.war/index.html" directory="false" removed="false" originator="127.0.0.1:1099" timestamp="2009-03-30T21:38:53.000-0500"/>
+        <content relative-path="farmC.war/" directory="true" removed="false" originator="127.0.0.1:1099" timestamp="2009-03-30T21:38:53.000-0500"/>
+        <content relative-path="farmC.war/WEB-INF/" directory="true" removed="false" originator="127.0.0.1:1099" timestamp="2009-03-30T21:38:53.000-0500"/>
+        <content relative-path="farmC.war/WEB-INF/web.xml" directory="false" removed="false" originator="192.168.1.145:1099" timestamp="2009-03-30T21:38:54.000-0500"/>
+        <content relative-path="farmC.war/index.html" directory="false" removed="false" originator="192.168.1.145:1099" timestamp="2009-03-30T21:38:54.000-0500"/>
+        <content relative-path="farmC.war/node0.html" directory="false" removed="false" originator="127.0.0.1:1099" timestamp="2009-03-30T21:38:53.000-0500"/>
+        <content relative-path="farmD.war/" directory="true" removed="true" originator="192.168.1.145:1099" timestamp="NOW"/>
+        <content relative-path="farmD.war/WEB-INF/" directory="true" removed="true" originator="192.168.1.145:1099" timestamp="NOW"/>
+        <content relative-path="farmD.war/WEB-INF/web.xml" directory="false" removed="true" originator="192.168.1.145:1099" timestamp="NOW"/>
+        <content relative-path="farmD.war/index.html" directory="false" removed="true" originator="192.168.1.145:1099" timestamp="NOW"/>
+        <content relative-path="node0-farm-deployment-service.xml" directory="false" removed="false" originator="127.0.0.1:1099" timestamp="2009-03-30T21:38:53.000-0500"/>
+    </repository-root>
+</repository-content>


Property changes on: trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/data/farm-repository-contents.xml
___________________________________________________________________
Name: svn:keywords
   + 

Added: trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/deploy/cluster/deploy-hasingleton-jboss-beans.xml
===================================================================
--- trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/deploy/cluster/deploy-hasingleton-jboss-beans.xml	                        (rev 0)
+++ trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/deploy/cluster/deploy-hasingleton-jboss-beans.xml	2009-03-31 22:11:55 UTC (rev 86554)
@@ -0,0 +1,135 @@
+<?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 "deploy-hasingleton" 		         	   -->
+<!--                                                                       -->
+<!-- ===================================================================== -->
+
+   <!-- 
+    |
+    | Interface to the ProfileService that can be called by an HASingletonController.
+    | Creates ProfileService sub-profile from the given list of URIs and then
+    | activates/deactivates the profile when called by the HASingletonController.
+    |
+   -->
+   <bean name="HASingletonProfileActivator" class="org.jboss.ha.singleton.HASingletonProfileActivator">
+      
+      <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss:service=HASingletonProfileActivator,partition=${jboss.partition.name:DefaultPartition}", exposedInterface=org.jboss.ha.singleton.HASingletonProfileManagerMBean.class, registerDirectly=true)</annotation>
+         
+      <property name="profileService"><inject bean="ProfileService"/></property>
+      
+   </bean>
+ 
+   <!--
+    |
+    | Tracks who the HASingleton master is and notifies the HASingletonProfileManager
+    | when it becomes the master or is no longer the master.
+    |
+   -->
+   <bean name="HASingletonDeployer" 
+   		 class="org.jboss.ha.singleton.HASingletonController">  
+      
+      <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.ha:service=HASingletonDeployer", exposedInterface=org.jboss.ha.singleton.HASingletonControllerMBean.class, registerDirectly=true)</annotation>       
+      
+      <depends>HAPartition</depends>
+      <!-- Have the BarrierController that listens for our JMX 
+           notifications start first. -->
+      <depends>HASingletonDeployerBarrierController</depends>
+      
+      <property name="HAPartition"><inject bean="HAPartition"/></property>
+      <property name="target"><inject bean="HASingletonProfileActivator"/></property>
+      <property name="targetStartMethod">activateProfile</property>
+      <property name="targetStopMethod">releaseProfile</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>
+
+   <!--
+    | A BarrierController that controls the lifecycle of a Barrier mbean
+    | based on JMX notifications issued by the HASingletonController above.
+    |
+    | Services deployed normally inside ./deploy that want to be
+    | started/stopped whenever the content of ./deploy-hasingleton/ gets
+    | deployed/undeployed, or else, whenever the current node becomes the
+    | master, need only specify a dependency on the Barrier:
+    |
+    |    <depends>jboss.ha:service=HASingletonDeployer,type=Barrier</depends>
+    |
+    | With this setup the Barrier and all services that depend on it
+    | will be started *after* the content of deploy-hasingleton is deployed.
+    | To change this, just use the following enabled notification types:
+    |
+    |    <enable type="org.jboss.ha.singleton.starting"/>
+    |    <enable type="org.jboss.ha.singleton.stopped"/>
+   -->
+   <bean class="org.jboss.system.BarrierController"
+          name="HASingletonDeployerBarrierController">
+    
+      <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.ha:service=HASingletonDeployer,type=BarrierControllerMBean", exposedInterface=org.jboss.system.BarrierControllerMBean.class, registerDirectly=true)</annotation> 
+            
+      <!-- Dependent services will depend on this mbean -->
+      <property name="barrierObjectName">jboss.ha:service=HASingletonDeployer,type=Barrier</property>
+    
+      <!-- Subscribe for notifications after startup since we start
+           before the HASingletonDeployer. -->
+      <property name="dynamicSubscriptions">true</property>    
+      <!-- The notification subscription handback that starts the barrier -->
+      <property name="startBarrierHandback">start</property>
+      <!-- The notification subscription handback that stops the barrier -->
+      <property name="stopBarrierHandback">stop</property>
+    
+      <!-- The notifications to subscribe for, along with their handbacks -->
+      <property name="subscriptions">
+         <list>
+            <!--value-->
+               <bean name="HASingletonDeployerStartSubscription" class="org.jboss.system.ListenerServiceMBeanSupport$SubscriptionInfo">
+                     <constructor>
+                        <parameter>jboss.ha:service=HASingletonDeployer</parameter>
+                        <parameter>start</parameter>
+                        <parameter>
+                        	<bean name="HASingletonDeployerStartSubscriptionNotificationFilter" class="javax.management.NotificationFilterSupport">
+                        		<install method="enableType">
+                        			<parameter>org.jboss.ha.singleton.started</parameter>
+                        		</install>
+                        	</bean>
+                        </parameter>
+                     </constructor>
+               </bean>
+            <!--/value>
+            <value-->
+               <bean name="HASingletonDeployerStopSubscription" class="org.jboss.system.ListenerServiceMBeanSupport$SubscriptionInfo">
+                     <constructor>
+                        <parameter>jboss.ha:service=HASingletonDeployer</parameter>
+                        <parameter>stop</parameter>
+                        <parameter>
+                        	<bean  name="HASingletonDeployerStopSubscriptionNotificationFilter" class="javax.management.NotificationFilterSupport">
+                        		<install method="enableType">
+                        			<parameter>org.jboss.ha.singleton.stopping</parameter>
+                        		</install>
+                        	</bean>
+                        </parameter>
+                     </constructor>
+               </bean>
+            <!--/value-->        
+         </list>
+      </property>
+   </bean>
+   
+</deployment>


Property changes on: trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/deploy/cluster/deploy-hasingleton-jboss-beans.xml
___________________________________________________________________
Name: svn:keywords
   + 

Added: trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/deploy/cluster/farm-deployment-jboss-beans.xml
===================================================================
--- trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/deploy/cluster/farm-deployment-jboss-beans.xml	                        (rev 0)
+++ trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/deploy/cluster/farm-deployment-jboss-beans.xml	2009-03-31 22:11:55 UTC (rev 86554)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+   
+   <bean name="FarmProfileRepositoryClusteringHandler"
+         class="org.jboss.profileservice.cluster.repository.DefaultRepositoryClusteringHandler">
+         
+      <property name="partition"><inject bean="HAPartition"/></property>
+      <property name="profileName">farm</property>
+      <property name="synchronizationPolicy"><inject bean="FarmProfileSynchronizationPolicy"/></property>
+   </bean>
+   
+   <bean name="FarmProfileSynchronizationPolicy" 
+         class="org.jboss.profileservice.cluster.repository.DefaultSynchronizationPolicy">
+      <property name="timestampService"><inject bean="TimestampDiscrepancyService"/></property>
+   </bean>
+
+</deployment>


Property changes on: trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/deploy/cluster/farm-deployment-jboss-beans.xml
___________________________________________________________________
Name: svn:keywords
   + 

Added: trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/deploy-hasingleton/hasingleton-deployment-service.xml
===================================================================
--- trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/deploy-hasingleton/hasingleton-deployment-service.xml	                        (rev 0)
+++ trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/deploy-hasingleton/hasingleton-deployment-service.xml	2009-03-31 22:11:55 UTC (rev 86554)
@@ -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=DeployHASingletonTestThreadPool">
+      <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>


Property changes on: trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/deploy-hasingleton/hasingleton-deployment-service.xml
___________________________________________________________________
Name: svn:keywords
   + 

Added: trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/farm/farmA.war/WEB-INF/web.xml
===================================================================
--- trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/farm/farmA.war/WEB-INF/web.xml	                        (rev 0)
+++ trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/farm/farmA.war/WEB-INF/web.xml	2009-03-31 22:11:55 UTC (rev 86554)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE web-app PUBLIC
+   "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+   "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<web-app>
+   <description>Farming test war</description>
+</web-app>
+


Property changes on: trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/farm/farmA.war/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
   + 

Added: trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/farm/farmA.war/index.html
===================================================================
--- trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/farm/farmA.war/index.html	                        (rev 0)
+++ trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/farm/farmA.war/index.html	2009-03-31 22:11:55 UTC (rev 86554)
@@ -0,0 +1 @@
+<html><body>index.html</body></html>
\ No newline at end of file

Added: trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/farm/farmC.war/WEB-INF/web.xml
===================================================================
--- trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/farm/farmC.war/WEB-INF/web.xml	                        (rev 0)
+++ trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/farm/farmC.war/WEB-INF/web.xml	2009-03-31 22:11:55 UTC (rev 86554)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE web-app PUBLIC
+   "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+   "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<web-app>
+   <description>Farming test war</description>
+</web-app>
+


Property changes on: trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/farm/farmC.war/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
   + 

Added: trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/farm/farmC.war/index.html
===================================================================
--- trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/farm/farmC.war/index.html	                        (rev 0)
+++ trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/farm/farmC.war/index.html	2009-03-31 22:11:55 UTC (rev 86554)
@@ -0,0 +1 @@
+<html><body>index.html</body></html>
\ No newline at end of file

Added: trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/farm/farmC.war/node0.html
===================================================================
--- trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/farm/farmC.war/node0.html	                        (rev 0)
+++ trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/farm/farmC.war/node0.html	2009-03-31 22:11:55 UTC (rev 86554)
@@ -0,0 +1 @@
+<html><body>node0.html</body></html>
\ No newline at end of file

Added: trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/farm/node0-farm-deployment-service.xml
===================================================================
--- trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/farm/node0-farm-deployment-service.xml	                        (rev 0)
+++ trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/farm/node0-farm-deployment-service.xml	2009-03-31 22:11:55 UTC (rev 86554)
@@ -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=Node0FarmTestThreadPool">
+      <attribute name="Name">Node0FarmThreadPool</attribute>
+      <attribute name="ThreadGroupName">Node0FarmThreads</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>


Property changes on: trunk/testsuite/src/resources/test-configs/cluster-profilesvc-0/farm/node0-farm-deployment-service.xml
___________________________________________________________________
Name: svn:keywords
   + 

Added: trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/conf/bootstrap/profile.xml
===================================================================
--- trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/conf/bootstrap/profile.xml	                        (rev 0)
+++ trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/conf/bootstrap/profile.xml	2009-03-31 22:11:55 UTC (rev 86554)
@@ -0,0 +1,149 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- 
+	The ProfileService.
+-->
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+	<classloader><inject bean="profile-classloader:0.0.0" /></classloader>
+
+	<classloader name="profile-classloader" xmlns="urn:jboss:classloader:1.0" export-all="NON_EMPTY" import-all="true">
+		<root>${jboss.lib.url}jboss-profileservice-spi.jar</root>
+	</classloader>
+
+	<!-- 
+		The profile configuration
+		This contains required properties:
+			The uri to jboss-service.xml.
+			The uri to the deployers folder.
+			A list of uris to deploy folders. -->
+	<bean name="BootstrapProfileFactory" class="org.jboss.system.server.profileservice.StaticClusteredProfileFactory">
+		<property name="bootstrapURI">${jboss.server.home.url}conf/jboss-service.xml</property>
+		<property name="deployersURI">${jboss.server.home.url}deployers</property>
+		<property name="applicationURIs">
+			<list elementClass="java.net.URI">
+				<value>${jboss.server.home.url}deploy</value>
+			</list>
+		</property>
+      <property name="farmURIs">
+         <list elementClass="java.net.URI">
+            <value>${jboss.server.home.url}farm</value>
+         </list>
+      </property>
+		<property name="attachmentStoreRoot">${jboss.server.data.dir}/attachments</property>
+		<property name="profileFactory"><inject bean="ProfileFactory" /></property>
+	</bean>
+	
+	<!--  The default profile key -->
+	<bean name="DefaultProfileKey" class="org.jboss.profileservice.spi.ProfileKey">
+		<constructor><parameter>${jboss.server.name}</parameter></constructor>
+	</bean>
+
+	<!-- The ProfileService -->
+	<bean name="ProfileService" class="org.jboss.system.server.profileservice.repository.AbstractProfileService">
+		<constructor><parameter><inject bean="jboss.kernel:service=KernelController" /></parameter></constructor>
+		<property name="deployer"><inject bean="ProfileServiceDeployer" /></property>
+		<property name="defaultProfile"><inject bean="DefaultProfileKey" /></property>
+	</bean>
+
+	<!-- The Bootstrap implementation that loads the Profile from the ProfileService -->
+	<bean name="ProfileServiceBootstrap" class="org.jboss.system.server.profileservice.ProfileServiceBootstrap">
+		<property name="profileKey"><inject bean="DefaultProfileKey" /></property>
+		<property name="mainDeployer"><inject bean="MainDeployer" /></property>
+		<property name="profileService"><inject bean="ProfileService" /></property>
+		<property name="mof"><inject bean="ManagedObjectFactory" /></property>
+		<property name="mgtDeploymentCreator"><inject bean="ManagedDeploymentCreator" /></property>
+		<property name="bootstrapProfileFactory"><inject bean="BootstrapProfileFactory" /></property>
+	</bean>
+
+	<!-- The profile factory -->
+	<bean name="ProfileFactory" class="org.jboss.system.server.profileservice.repository.AbstractProfileFactory">
+		<property name="profileRepository"><inject bean="ProfileRepositoryFactory" /></property>
+	</bean>
+
+	<!-- The profile repository factory -->
+	<bean name="ProfileRepositoryFactory" class="org.jboss.system.server.profileservice.repository.TypedProfileRepository">
+		<!-- Accept any DeploymentRepositoryFactory -->
+		<incallback method="addRepositoryFactory" />
+		<uncallback method="removeRepositoryFactory" />
+	</bean>
+
+  <!-- The structure modification cache and checker -->
+
+  <bean name="StructureModCache" class="org.jboss.deployers.vfs.spi.structure.modified.DefaultStructureCache">
+    <destroy method="flush"/>
+  </bean>
+
+  <bean name="StructureModificationChecker" class="org.jboss.deployers.vfs.spi.structure.modified.MetaDataStructureModificationChecker">
+    <constructor>
+      <parameter><inject bean="MainDeployer" /></parameter>
+    </constructor>
+    <property name="cache"><inject bean="StructureModCache" /></property>
+    <property name="filter"><bean class="org.jboss.system.server.profile.basic.XmlIncludeVirtualFileFilter" /></property>
+  </bean>
+
+	<!-- The default deployment repository factory -->
+	<bean name="DefaultDeploymentRepositoryFactory" class="org.jboss.system.server.profileservice.repository.DefaultDeploymentRepositoryFactory">
+		<property name="deploymentFilter"><inject bean="DeploymentFilter" /></property>
+		<property name="checker"><inject bean="StructureModificationChecker" /></property>
+	</bean>
+
+   <!-- The clustered deployment repository factory -->
+   <bean name="ClusteredDeploymentRepositoryFactory" class="org.jboss.system.server.profileservice.repository.clustered.ClusteredDeploymentRepositoryFactory">
+      <property name="deploymentFilter"><inject bean="DeploymentFilter" /></property>
+      <property name="checker"><inject bean="StructureModificationChecker" /></property>
+      <!-- Accept any RepositoryClusteringHandler -->
+      <incallback method="addRepositoryClusteringHandler" />
+      <uncallback method="removeRepositoryClusteringHandler" />
+      <!-- Accept any LocalContentManagerFactory -->
+      <incallback method="addLocalContentManagerFactory" />
+      <uncallback method="removeLocalContentManagerFactory" />
+   </bean>
+   
+   <!--  Handles persistence of metadata about clustered DeploymentRepository content -->
+   <bean name="ClusteredDeploymentRepositoryMetadataPersister"
+         class="org.jboss.system.server.profileservice.repository.clustered.local.JAXBRepositoryContentMetadataPersister">
+      <constructor>
+         <!-- Here we use the constructor version that takes the Server impl and 
+              uses it to find the data dir. You could alternatively use a version 
+              that takes a URI or a File. -->
+         <parameter><inject bean="JBossServer"/></parameter>
+      </constructor>
+   </bean>
+         
+   <!--  Factory for manager of local persistence of clustered DeploymentRepository content -->
+   <bean name="FilesystemLocalContentManagerFactory" 
+         class="org.jboss.system.server.profileservice.repository.clustered.local.file.FilesystemLocalContentManagerFactory">
+      <property name="metadataPersister"><inject bean="ClusteredDeploymentRepositoryMetadataPersister"/></property>
+      <property name="tempDirURI">${jboss.server.home.url}temp${/}cluster-repo</property>
+   </bean>
+
+	<!-- The attachment store -->
+	<bean name="AttachmentStore" class="org.jboss.system.server.profileservice.repository.AbstractAttachmentStore">
+		<constructor><parameter><inject bean="BootstrapProfileFactory" property="attachmentStoreRoot" /></parameter></constructor>
+		<property name="mainDeployer"><inject bean="MainDeployer" /></property>
+		<property name="serializer"><inject bean="AttachmentsSerializer" /></property>
+	</bean>
+
+	<bean name="AttachmentsSerializer" class="org.jboss.system.server.profileservice.repository.JAXBAttachmentSerializer">
+		<constructor><parameter><inject bean="BootstrapProfileFactory" property="attachmentStoreRoot" /></parameter></constructor>
+	</bean>
+
+	<bean name="ProfileServiceDeployer" class="org.jboss.system.server.profileservice.repository.MainDeployerAdapter">
+		<property name="mainDeployer"><inject bean="MainDeployer" /></property>
+		<property name="attachmentStore"><inject bean="AttachmentStore" /></property>
+	</bean>
+
+   <bean name="ProfileServicePersistenceDeployer" class="org.jboss.system.server.profileservice.persistence.deployer.ProfileServicePersistenceDeployer" />
+
+	<!-- A filter for excluding files from the scanner -->
+	<bean name="DeploymentFilter" class="org.jboss.virtual.plugins.vfs.helpers.ExtensibleFilter">
+		<!-- Files starting with theses strings are ignored -->
+		<property name="prefixes">#,%,\,,.,_$</property>
+		<!-- Files ending with theses strings are ignored -->
+		<property name="suffixes">#,$,%,~,\,v,.BAK,.bak,.old,.orig,.tmp,.rej,.sh</property>
+		<!-- Files matching with theses strings are ignored -->
+		<property name="matches">.make.state,.nse_depinfo,CVS,CVS.admin,RCS,RCSLOG,SCCS,TAGS,core,tags</property>
+	</bean>
+
+</deployment>
\ No newline at end of file


Property changes on: trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/conf/bootstrap/profile.xml
___________________________________________________________________
Name: svn:keywords
   + 

Added: trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/deploy/cluster/deploy-hasingleton-jboss-beans.xml
===================================================================
--- trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/deploy/cluster/deploy-hasingleton-jboss-beans.xml	                        (rev 0)
+++ trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/deploy/cluster/deploy-hasingleton-jboss-beans.xml	2009-03-31 22:11:55 UTC (rev 86554)
@@ -0,0 +1,135 @@
+<?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 "deploy-hasingleton" 		         	   -->
+<!--                                                                       -->
+<!-- ===================================================================== -->
+
+   <!-- 
+    |
+    | Interface to the ProfileService that can be called by an HASingletonController.
+    | Creates ProfileService sub-profile from the given list of URIs and then
+    | activates/deactivates the profile when called by the HASingletonController.
+    |
+   -->
+   <bean name="HASingletonProfileActivator" class="org.jboss.ha.singleton.HASingletonProfileActivator">
+      
+      <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss:service=HASingletonProfileActivator,partition=${jboss.partition.name:DefaultPartition}", exposedInterface=org.jboss.ha.singleton.HASingletonProfileManagerMBean.class, registerDirectly=true)</annotation>
+         
+      <property name="profileService"><inject bean="ProfileService"/></property>
+      
+   </bean>
+ 
+   <!--
+    |
+    | Tracks who the HASingleton master is and notifies the HASingletonProfileManager
+    | when it becomes the master or is no longer the master.
+    |
+   -->
+   <bean name="HASingletonDeployer" 
+   		 class="org.jboss.ha.singleton.HASingletonController">  
+      
+      <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.ha:service=HASingletonDeployer", exposedInterface=org.jboss.ha.singleton.HASingletonControllerMBean.class, registerDirectly=true)</annotation>       
+      
+      <depends>HAPartition</depends>
+      <!-- Have the BarrierController that listens for our JMX 
+           notifications start first. -->
+      <depends>HASingletonDeployerBarrierController</depends>
+      
+      <property name="HAPartition"><inject bean="HAPartition"/></property>
+      <property name="target"><inject bean="HASingletonProfileActivator"/></property>
+      <property name="targetStartMethod">activateProfile</property>
+      <property name="targetStopMethod">releaseProfile</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>
+
+   <!--
+    | A BarrierController that controls the lifecycle of a Barrier mbean
+    | based on JMX notifications issued by the HASingletonController above.
+    |
+    | Services deployed normally inside ./deploy that want to be
+    | started/stopped whenever the content of ./deploy-hasingleton/ gets
+    | deployed/undeployed, or else, whenever the current node becomes the
+    | master, need only specify a dependency on the Barrier:
+    |
+    |    <depends>jboss.ha:service=HASingletonDeployer,type=Barrier</depends>
+    |
+    | With this setup the Barrier and all services that depend on it
+    | will be started *after* the content of deploy-hasingleton is deployed.
+    | To change this, just use the following enabled notification types:
+    |
+    |    <enable type="org.jboss.ha.singleton.starting"/>
+    |    <enable type="org.jboss.ha.singleton.stopped"/>
+   -->
+   <bean class="org.jboss.system.BarrierController"
+          name="HASingletonDeployerBarrierController">
+    
+      <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.ha:service=HASingletonDeployer,type=BarrierControllerMBean", exposedInterface=org.jboss.system.BarrierControllerMBean.class, registerDirectly=true)</annotation> 
+            
+      <!-- Dependent services will depend on this mbean -->
+      <property name="barrierObjectName">jboss.ha:service=HASingletonDeployer,type=Barrier</property>
+    
+      <!-- Subscribe for notifications after startup since we start
+           before the HASingletonDeployer. -->
+      <property name="dynamicSubscriptions">true</property>    
+      <!-- The notification subscription handback that starts the barrier -->
+      <property name="startBarrierHandback">start</property>
+      <!-- The notification subscription handback that stops the barrier -->
+      <property name="stopBarrierHandback">stop</property>
+    
+      <!-- The notifications to subscribe for, along with their handbacks -->
+      <property name="subscriptions">
+         <list>
+            <!--value-->
+               <bean name="HASingletonDeployerStartSubscription" class="org.jboss.system.ListenerServiceMBeanSupport$SubscriptionInfo">
+                     <constructor>
+                        <parameter>jboss.ha:service=HASingletonDeployer</parameter>
+                        <parameter>start</parameter>
+                        <parameter>
+                        	<bean name="HASingletonDeployerStartSubscriptionNotificationFilter" class="javax.management.NotificationFilterSupport">
+                        		<install method="enableType">
+                        			<parameter>org.jboss.ha.singleton.started</parameter>
+                        		</install>
+                        	</bean>
+                        </parameter>
+                     </constructor>
+               </bean>
+            <!--/value>
+            <value-->
+               <bean name="HASingletonDeployerStopSubscription" class="org.jboss.system.ListenerServiceMBeanSupport$SubscriptionInfo">
+                     <constructor>
+                        <parameter>jboss.ha:service=HASingletonDeployer</parameter>
+                        <parameter>stop</parameter>
+                        <parameter>
+                        	<bean  name="HASingletonDeployerStopSubscriptionNotificationFilter" class="javax.management.NotificationFilterSupport">
+                        		<install method="enableType">
+                        			<parameter>org.jboss.ha.singleton.stopping</parameter>
+                        		</install>
+                        	</bean>
+                        </parameter>
+                     </constructor>
+               </bean>
+            <!--/value-->        
+         </list>
+      </property>
+   </bean>
+   
+</deployment>


Property changes on: trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/deploy/cluster/deploy-hasingleton-jboss-beans.xml
___________________________________________________________________
Name: svn:keywords
   + 

Added: trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/deploy/cluster/farm-deployment-jboss-beans.xml
===================================================================
--- trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/deploy/cluster/farm-deployment-jboss-beans.xml	                        (rev 0)
+++ trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/deploy/cluster/farm-deployment-jboss-beans.xml	2009-03-31 22:11:55 UTC (rev 86554)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+   
+   <bean name="FarmProfileRepositoryClusteringHandler"
+         class="org.jboss.profileservice.cluster.repository.DefaultRepositoryClusteringHandler">
+         
+      <property name="partition"><inject bean="HAPartition"/></property>
+      <property name="profileName">farm</property>
+      <property name="synchronizationPolicy"><inject bean="FarmProfileSynchronizationPolicy"/></property>
+   </bean>
+   
+   <bean name="FarmProfileSynchronizationPolicy" 
+         class="org.jboss.profileservice.cluster.repository.DefaultSynchronizationPolicy">
+      <property name="timestampService"><inject bean="TimestampDiscrepancyService"/></property>
+   </bean>
+
+</deployment>


Property changes on: trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/deploy/cluster/farm-deployment-jboss-beans.xml
___________________________________________________________________
Name: svn:keywords
   + 

Added: trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/deploy-hasingleton/hasingleton-deployment-service.xml
===================================================================
--- trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/deploy-hasingleton/hasingleton-deployment-service.xml	                        (rev 0)
+++ trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/deploy-hasingleton/hasingleton-deployment-service.xml	2009-03-31 22:11:55 UTC (rev 86554)
@@ -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=DeployHASingletonTestThreadPool">
+      <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>


Property changes on: trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/deploy-hasingleton/hasingleton-deployment-service.xml
___________________________________________________________________
Name: svn:keywords
   + 

Added: trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/farm/farmB.war/WEB-INF/web.xml
===================================================================
--- trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/farm/farmB.war/WEB-INF/web.xml	                        (rev 0)
+++ trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/farm/farmB.war/WEB-INF/web.xml	2009-03-31 22:11:55 UTC (rev 86554)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE web-app PUBLIC
+   "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+   "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<web-app>
+   <description>Farming test war</description>
+</web-app>
+


Property changes on: trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/farm/farmB.war/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
   + 

Added: trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/farm/farmB.war/index.html
===================================================================
--- trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/farm/farmB.war/index.html	                        (rev 0)
+++ trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/farm/farmB.war/index.html	2009-03-31 22:11:55 UTC (rev 86554)
@@ -0,0 +1 @@
+<html><body>index.html</body></html>
\ No newline at end of file

Added: trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/farm/farmC.war/WEB-INF/web.xml
===================================================================
--- trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/farm/farmC.war/WEB-INF/web.xml	                        (rev 0)
+++ trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/farm/farmC.war/WEB-INF/web.xml	2009-03-31 22:11:55 UTC (rev 86554)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE web-app PUBLIC
+   "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+   "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<web-app>
+   <description>Farming test war</description>
+</web-app>
+


Property changes on: trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/farm/farmC.war/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
   + 

Added: trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/farm/farmC.war/index.html
===================================================================
--- trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/farm/farmC.war/index.html	                        (rev 0)
+++ trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/farm/farmC.war/index.html	2009-03-31 22:11:55 UTC (rev 86554)
@@ -0,0 +1 @@
+<html><body>index.html</body></html>
\ No newline at end of file

Added: trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/farm/farmC.war/node1.html
===================================================================
--- trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/farm/farmC.war/node1.html	                        (rev 0)
+++ trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/farm/farmC.war/node1.html	2009-03-31 22:11:55 UTC (rev 86554)
@@ -0,0 +1 @@
+<html><body>node1.html</body></html>
\ No newline at end of file

Added: trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/farm/farmD.war/WEB-INF/web.xml
===================================================================
--- trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/farm/farmD.war/WEB-INF/web.xml	                        (rev 0)
+++ trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/farm/farmD.war/WEB-INF/web.xml	2009-03-31 22:11:55 UTC (rev 86554)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE web-app PUBLIC
+   "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+   "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<web-app>
+   <description>Farming test war</description>
+</web-app>
+


Property changes on: trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/farm/farmD.war/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
   + 

Added: trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/farm/farmD.war/index.html
===================================================================
--- trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/farm/farmD.war/index.html	                        (rev 0)
+++ trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/farm/farmD.war/index.html	2009-03-31 22:11:55 UTC (rev 86554)
@@ -0,0 +1 @@
+<html><body>index.html</body></html>
\ No newline at end of file

Added: trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/farm/node1-farm-deployment-service.xml
===================================================================
--- trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/farm/node1-farm-deployment-service.xml	                        (rev 0)
+++ trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/farm/node1-farm-deployment-service.xml	2009-03-31 22:11:55 UTC (rev 86554)
@@ -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=Node1FarmTestThreadPool">
+      <attribute name="Name">Node1FarmThreadPool</attribute>
+      <attribute name="ThreadGroupName">Node1FarmThreads</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>


Property changes on: trunk/testsuite/src/resources/test-configs/cluster-profilesvc-1/farm/node1-farm-deployment-service.xml
___________________________________________________________________
Name: svn:keywords
   + 




More information about the jboss-cvs-commits mailing list