[jboss-cvs] JBossAS SVN: r58597 - trunk/testsuite/src/resources/cluster/partition

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sat Nov 18 06:50:44 EST 2006


Author: bstansberry at jboss.com
Date: 2006-11-18 06:50:44 -0500 (Sat, 18 Nov 2006)
New Revision: 58597

Added:
   trunk/testsuite/src/resources/cluster/partition/jboss-beans.xml
Log:
Configure via -beans.xml

Added: trunk/testsuite/src/resources/cluster/partition/jboss-beans.xml
===================================================================
--- trunk/testsuite/src/resources/cluster/partition/jboss-beans.xml	2006-11-18 11:50:20 UTC (rev 58596)
+++ trunk/testsuite/src/resources/cluster/partition/jboss-beans.xml	2006-11-18 11:50:44 UTC (rev 58597)
@@ -0,0 +1,304 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+   
+   <!-- ==================================================================== -->
+   <!-- Shared cache for JBoss cluster services                              -->
+   <!-- ==================================================================== -->
+   
+   <!-- 
+        The HAPartitionCache instance defined here is shared by JBoss cluster services that
+        use JBossCache as their underlying data store.  Currently the services that share this 
+        cache are HAJNDI and DistributedState.  It is possible to change the cluster name but this 
+        isn't recommended since it will be more difficult for others to recognize that the renamed 
+        cluster is the one used by JBoss cluster services.  
+   -->
+   
+   <!-- First we create a Configuration object for the cache -->
+   <bean name="BadHAPartitionCacheConfig" 
+   		class="org.jboss.cache.config.Configuration">
+        
+        <!-- Externally injected services -->  
+        <property name="runtimeConfig">
+           <bean name="DefaultPartition-HAPartitionCacheRuntimeConfig" class="org.jboss.cache.config.RuntimeConfig">
+              <property name="transactionManager"><inject bean="jboss:service=TransactionManager" property="transactionManager"/></property>
+              <property name="muxChannelFactory"><inject bean="jgroups.mux:name=Multiplexer"/></property>
+           </bean>
+        </property>
+        
+        <property name="multiplexerStack">${jboss.multiplexer.stack:udp}</property>
+
+        <!-- Valid isolation levels are 
+                              SERIALIZABLE
+                              REPEATABLE_READ (default)
+                              READ_COMMITTED
+                              READ_UNCOMMITTED
+                              NONE
+        -->
+        <property name="isolationLevelString">REPEATABLE_READ</property>
+
+        <!-- Valid modes are LOCAL, REPL_ASYNC and REPL_SYNC -->
+        <property name="cacheModeString">REPL_SYNC</property>
+
+        <!-- Just used for async repl: use a replication queue -->
+        <property name="useReplQueue">false</property>
+
+        <!-- Replication interval for replication queue (in ms) -->
+        <property name="replQueueInterval">0</property>
+
+        <!-- Max number of elements which trigger replication -->
+        <property name="replQueueMaxElements">10</property>
+
+        <!-- Name of cluster. Needs to be the same for all nodes in clusters, 
+          in order to find each other -->
+        <property name="clusterName">DefaultPartition-HAPartitionCache</property>
+
+        <!-- Whether or not to fetch state on joining a cluster  -->
+        <property name="fetchInMemoryState">true</property>
+
+        <!-- The max amount of time (in milliseconds) we wait until the
+            initial state (ie. the contents of the cache) are retrieved from
+            existing members in a clustered environment -->
+        <property name="initialStateRetrievalTimeout">5000</property>
+
+        <!-- Number of milliseconds to wait until all responses for a
+            synchronous call have been received. -->
+        <property name="syncReplTimeout">20000</property>
+
+        <!-- Max number of milliseconds to wait for a lock acquisition -->
+        <property name="lockAcquisitionTimeout">15000</property>
+        
+        <property name="exposeManagementStatistics">true</property>
+
+    </bean>
+    
+   <!-- Now we use the above configuration to construct the cache itself -->
+   <bean name="BadHAPartitionCache" class="org.jboss.cache.TreeCacheProxyImpl">
+   
+      <depends>jboss:service=Naming</depends>
+      
+      <constructor factoryClass="org.jboss.cache.factories.DefaultCacheFactory" factoryMethod="createCache">
+         <parameter class="org.jboss.cache.config.Configuration"><inject bean="BadHAPartitionCacheConfig"/></parameter>
+         <parameter class="boolean">false</parameter>
+      </constructor>
+      
+   </bean>
+   
+   <!-- ==================================================================== -->
+   <!-- Partition used for testing failure to receive state                  -->
+   <!-- ==================================================================== -->
+   
+   <!-- Service to record and cache any failures in the partition -->
+   <bean name="BadProviderPartitionRecorder"
+         class="org.jboss.test.cluster.partition.HAPartitionRecorder">j
+         <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss:service=BadProviderPartitionRecorder", exposedInterface=org.jboss.test.cluster.partition.HAPartitionRecorderMBean.class, registerDirectly=true)</annotation>
+   </bean>
+         
+   <bean name="BadProviderPartition"
+   		 class="org.jboss.test.cluster.partition.StartupTestClusterPartition">     
+   		 
+   	<constructor>
+   	   <parameter>
+            <bean name="BadProviderPartitionConfig" class="org.jboss.ha.framework.server.ClusterPartitionConfig">   
+               
+               <!-- ClusterPartition requires a Cache for state management -->
+               <property name="clusteredCache"><inject bean="BadHAPartitionCache"/></property>
+               
+               <!--property name="distributedState"><inject bean="DistributedState"/></property-->
+                
+               <!-- Name of the partition being built -->
+               <property name="partitionName">BadProviderPartition</property>
+         
+               <!-- The address used to determine the node name -->
+               <property name="nodeAddress">${jboss.bind.address}</property>
+         
+               <!-- Inject the naming service port as an aid in creating a nodeUniqueId.  Not needed if nodeUniqueId is set -->
+               <property name="namingServicePort"><inject bean="jboss:service=Naming" property="port"/></property>
+               
+               <!-- Determine if deadlock detection is enabled -->
+               <property name="deadlockDetection">false</property>
+              
+               <!-- Max time (in ms) to wait for state transfer to complete. Increase for large states -->
+               <property name="stateTransferTimeout">2000</property>
+              
+               <!-- Max time (in ms) to wait for RPC calls to complete. -->
+               <property name="methodCallTimeout">5000</property>            
+               
+            </bean>
+         </parameter>
+      </constructor>
+      
+      <property name="startupRecorder"><inject bean="BadProviderPartitionRecorder"/></property>
+      
+   </bean>
+   
+   <bean name="BadHAPartitionStateTransfer,returnState=false"
+         class="org.jboss.test.cluster.partition.BadHAPartitionStateTransfer">
+      
+      <property name="clusterPartition">BadProviderPartition</property>
+         
+      <property name="returnState">false</property>
+      
+   </bean>
+
+   <!-- ==================================================================== -->
+   <!-- Partition used for testing failure to integrate state                -->
+   <!-- ==================================================================== -->
+   
+   <!-- Service to record and cache any failures in the partition -->
+   <bean name="BadStatePartitionRecorder"
+         class="org.jboss.test.cluster.partition.HAPartitionRecorder">j
+         <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss:service=BadStatePartitionRecorder", exposedInterface=org.jboss.test.cluster.partition.HAPartitionRecorderMBean.class, registerDirectly=true)</annotation>
+   </bean>
+         
+   <bean name="BadStatePartition"
+   		 class="org.jboss.test.cluster.partition.StartupTestClusterPartition">     
+   		 
+   	<constructor>
+   	   <parameter>
+            <bean name="BadStatePartitionConfig" class="org.jboss.ha.framework.server.ClusterPartitionConfig">   
+               
+               <!-- ClusterPartition requires a Cache for state management -->
+               <property name="clusteredCache"><inject bean="BadHAPartitionCache"/></property>
+               
+               <!--property name="distributedState"><inject bean="DistributedState"/></property-->
+                
+               <!-- Name of the partition being built -->
+               <property name="partitionName">BadStatePartition</property>
+         
+               <!-- The address used to determine the node name -->
+               <property name="nodeAddress">${jboss.bind.address}</property>
+         
+               <!-- Inject the naming service port as an aid in creating a nodeUniqueId.  Not needed if nodeUniqueId is set -->
+               <property name="namingServicePort"><inject bean="jboss:service=Naming" property="port"/></property>
+               
+               <!-- Determine if deadlock detection is enabled -->
+               <property name="deadlockDetection">false</property>
+              
+               <!-- Max time (in ms) to wait for state transfer to complete. Increase for large states -->
+               <property name="stateTransferTimeout">2000</property>
+              
+               <!-- Max time (in ms) to wait for RPC calls to complete. -->
+               <property name="methodCallTimeout">5000</property>            
+               
+            </bean>
+         </parameter>
+      </constructor>
+      
+      <property name="startupRecorder"><inject bean="BadStatePartitionRecorder"/></property>
+      
+   </bean>
+   
+   <bean name="BadHAPartitionStateTransfer,returnState=true"
+         class="org.jboss.test.cluster.partition.BadHAPartitionStateTransfer">
+      
+      <property name="clusterPartition">BadStatePartition</property>
+         
+      <property name="returnState">true</property>
+      
+   </bean>
+
+   <!-- ==================================================================== -->
+   <!-- Partition used for testing no state                                  -->
+   <!-- ==================================================================== -->
+   
+   <!-- Service to record and cache any failures in the partition -->
+   <bean name="NoStatePartitionRecorder"
+         class="org.jboss.test.cluster.partition.HAPartitionRecorder">j
+         <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss:service=NoStatePartitionRecorder", exposedInterface=org.jboss.test.cluster.partition.HAPartitionRecorderMBean.class, registerDirectly=true)</annotation>
+   </bean>
+         
+   <bean name="NoStatePartition"
+   		 class="org.jboss.test.cluster.partition.StartupTestClusterPartition">     
+   		 
+   	<constructor>
+   	   <parameter>
+            <bean name="BadStatePartitionConfig" class="org.jboss.ha.framework.server.ClusterPartitionConfig">   
+               
+               <!-- ClusterPartition requires a Cache for state management -->
+               <property name="clusteredCache"><inject bean="BadHAPartitionCache"/></property>
+               
+               <!--property name="distributedState"><inject bean="DistributedState"/></property-->
+                
+               <!-- Name of the partition being built -->
+               <property name="partitionName">NoStatePartition</property>
+         
+               <!-- The address used to determine the node name -->
+               <property name="nodeAddress">${jboss.bind.address}</property>
+         
+               <!-- Inject the naming service port as an aid in creating a nodeUniqueId.  Not needed if nodeUniqueId is set -->
+               <property name="namingServicePort"><inject bean="jboss:service=Naming" property="port"/></property>
+               
+               <!-- Determine if deadlock detection is enabled -->
+               <property name="deadlockDetection">false</property>
+              
+               <!-- Max time (in ms) to wait for state transfer to complete. Increase for large states -->
+               <property name="stateTransferTimeout">2000</property>
+              
+               <!-- Max time (in ms) to wait for RPC calls to complete. -->
+               <property name="methodCallTimeout">5000</property>            
+               
+            </bean>
+         </parameter>
+      </constructor>
+      
+      <property name="startupRecorder"><inject bean="NoStatePartitionRecorder"/></property>
+      
+   </bean>
+
+   <!-- ==================================================================== -->
+   <!-- Partition used for testing successful state transfer                 -->
+   <!-- ==================================================================== -->
+   
+   <!-- Service to record and cache any failures in the partition -->
+   <bean name="GoodStatePartitionRecorder"
+         class="org.jboss.test.cluster.partition.HAPartitionRecorder">j
+         <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss:service=GoodStatePartitionRecorder", exposedInterface=org.jboss.test.cluster.partition.HAPartitionRecorderMBean.class, registerDirectly=true)</annotation>
+   </bean>
+         
+   <bean name="GoodStatePartition"
+   		 class="org.jboss.test.cluster.partition.StartupTestClusterPartition">     
+   		 
+   	<constructor>
+   	   <parameter>
+            <bean name="BadStatePartitionConfig" class="org.jboss.ha.framework.server.ClusterPartitionConfig">   
+               
+               <!-- ClusterPartition requires a Cache for state management -->
+               <property name="clusteredCache"><inject bean="BadHAPartitionCache"/></property>
+               
+               <!--property name="distributedState"><inject bean="DistributedState"/></property-->
+                
+               <!-- Name of the partition being built -->
+               <property name="partitionName">GoodStatePartition</property>
+         
+               <!-- The address used to determine the node name -->
+               <property name="nodeAddress">${jboss.bind.address}</property>
+         
+               <!-- Inject the naming service port as an aid in creating a nodeUniqueId.  Not needed if nodeUniqueId is set -->
+               <property name="namingServicePort"><inject bean="jboss:service=Naming" property="port"/></property>
+               
+               <!-- Determine if deadlock detection is enabled -->
+               <property name="deadlockDetection">false</property>
+              
+               <!-- Max time (in ms) to wait for state transfer to complete. Increase for large states -->
+               <property name="stateTransferTimeout">2000</property>
+              
+               <!-- Max time (in ms) to wait for RPC calls to complete. -->
+               <property name="methodCallTimeout">5000</property>            
+               
+            </bean>
+         </parameter>
+      </constructor>
+      
+      <property name="startupRecorder"><inject bean="GoodStatePartitionRecorder"/></property>
+      
+   </bean>
+   
+   <bean name="CustomStateHAPartitionStateTransfer"
+         class="org.jboss.test.cluster.partition.CustomStateHAPartitionStateTransfer">
+      
+      <property name="clusterPartition">GoodStatePartition</property>
+      
+   </bean>
+
+</deployment>




More information about the jboss-cvs-commits mailing list