[jboss-cvs] JBossAS SVN: r71114 - in branches/JBPAPP_4_2_0_GA_CP/testsuite: imports and 9 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Mar 20 23:11:17 EDT 2008


Author: bstansberry at jboss.com
Date: 2008-03-20 23:11:16 -0400 (Thu, 20 Mar 2008)
New Revision: 71114

Added:
   branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/drm/DRMUserMBean.java
   branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/ds/DistributedStateUserMBean.java
Modified:
   branches/JBPAPP_4_2_0_GA_CP/testsuite/build.xml
   branches/JBPAPP_4_2_0_GA_CP/testsuite/imports/server-config.xml
   branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/drm/DRMUser.java
   branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/ds/DistributedStateUser.java
   branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/partition/test/PartitionRestartUnitTestCase.java
   branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/test/DRMTestCase.java
   branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/test/DistributedStateTestCase.java
   branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/test/HAJndiTestCase.java
   branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/testbeancluster/test/RetryInterceptorUnitTestCase.java
   branches/JBPAPP_4_2_0_GA_CP/testsuite/src/resources/cluster/drm/jboss-service.xml
   branches/JBPAPP_4_2_0_GA_CP/testsuite/src/resources/cluster/ds/jboss-service.xml
   branches/JBPAPP_4_2_0_GA_CP/testsuite/src/resources/jmx/ha/META-INF/jboss-service.xml
   branches/JBPAPP_4_2_0_GA_CP/testsuite/src/resources/testbeancluster/cif-jboss.xml
Log:
[JBPAPP-715] Cluster testsuite HA-JNDI clients should limit autodiscovery to their partition

Modified: branches/JBPAPP_4_2_0_GA_CP/testsuite/build.xml
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/testsuite/build.xml	2008-03-21 02:51:04 UTC (rev 71113)
+++ branches/JBPAPP_4_2_0_GA_CP/testsuite/build.xml	2008-03-21 03:11:16 UTC (rev 71114)
@@ -73,6 +73,14 @@
   <!-- Same thing, but passed to the client -->
   <property name="jbosstest.udpGroup" value="${udpGroup}"/>
   
+  <!-- PartitionName -->
+  <!-- The value of the -g option passed to jboss in some configs -->
+  <!-- Override this in the local.properties or pass to Ant as -DpartitionName=128.x.x.x -->
+  <property name="partitionName" value="DefaultPartition"/>
+  <!-- Same thing, but passed to the client -->
+  <property name="jbosstest.partitionName" value="${partitionName}"/>
+  
+  
   <!-- =================== -->
   <!-- Basic Configuration -->
   <!-- =================== -->

Modified: branches/JBPAPP_4_2_0_GA_CP/testsuite/imports/server-config.xml
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/testsuite/imports/server-config.xml	2008-03-21 02:51:04 UTC (rev 71113)
+++ branches/JBPAPP_4_2_0_GA_CP/testsuite/imports/server-config.xml	2008-03-21 03:11:16 UTC (rev 71114)
@@ -187,10 +187,12 @@
       <server name="cluster-UDP-0" host="${node0}">
         <sysproperty key="resolve.dns" value="false" />
         <sysproperty key="jgroups.udp.ip_ttl" value="${jbosstest.udp.ip_ttl}" />
+      	<sysproperty key="jboss.partition.name" value="${partitionName}"/>
       </server>
       <server name="cluster-UDP-1" host="${node1}">
         <sysproperty key="resolve.dns" value="false" />
         <sysproperty key="jgroups.udp.ip_ttl" value="${jbosstest.udp.ip_ttl}" />
+      	<sysproperty key="jboss.partition.name" value="${partitionName}"/>
       </server>
       <server name="cluster-field-UDP-0" host="${node0}">
         <sysproperty key="resolve.dns" value="false" />
@@ -235,10 +237,12 @@
       <server name="cluster-TCP-0" host="${node0}">
         <sysproperty key="resolve.dns" value="false" />
         <sysproperty key="jgroups.udp.ip_ttl" value="${jbosstest.udp.ip_ttl}" />
+      	<sysproperty key="jboss.partition.name" value="${partitionName}"/>
       </server>
       <server name="cluster-TCP-1" host="${node1}">
         <sysproperty key="resolve.dns" value="false" />
         <sysproperty key="jgroups.udp.ip_ttl" value="${jbosstest.udp.ip_ttl}" />
+      	<sysproperty key="jboss.partition.name" value="${partitionName}"/>
       </server>
       <server name="cluster-field-TCP-0" host="${node0}">
         <sysproperty key="resolve.dns" value="false" />

Modified: branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/drm/DRMUser.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/drm/DRMUser.java	2008-03-21 02:51:04 UTC (rev 71113)
+++ branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/drm/DRMUser.java	2008-03-21 03:11:16 UTC (rev 71114)
@@ -38,13 +38,15 @@
    @version $Revision$
 */
 public class DRMUser extends JBossNotificationBroadcasterSupport
-   implements IReplicants, ReplicantListener
+   implements ReplicantListener, DRMUserMBean
 {
+   private static final String DEFAULT_PARTITION_NAME = System.getProperty("jboss.partition.name", "DefaultPartition");
+   
    protected static Logger log = Logger.getLogger(DRMUser.class);
 
    protected DistributedReplicantManager drm;
    protected String category = "DRMUser";
-   protected String partitionName = "DefaultPartition";
+   protected String partitionName = DEFAULT_PARTITION_NAME;
    protected long sequence;
 
    public String getPartitionName()

Added: branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/drm/DRMUserMBean.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/drm/DRMUserMBean.java	                        (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/drm/DRMUserMBean.java	2008-03-21 03:11:16 UTC (rev 71114)
@@ -0,0 +1,37 @@
+/*
+ * 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.drm;
+
+public interface DRMUserMBean extends IReplicants
+{
+   String getPartitionName();
+
+   void setPartitionName(String partitionName);
+
+   String getCategory();
+
+   void setCategory(String category);
+   
+   void start() throws Exception;
+   
+   void stop() throws Exception;
+}
\ No newline at end of file

Modified: branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/ds/DistributedStateUser.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/ds/DistributedStateUser.java	2008-03-21 02:51:04 UTC (rev 71113)
+++ branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/ds/DistributedStateUser.java	2008-03-21 03:11:16 UTC (rev 71114)
@@ -39,7 +39,7 @@
     @version $Revision$
 */
 public class DistributedStateUser extends JBossNotificationBroadcasterSupport
-   implements IDistributedState, DSListenerEx
+   implements DSListenerEx, DistributedStateUserMBean
 {
    protected static Logger log = Logger.getLogger(DistributedStateUser.class);
 

Added: branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/ds/DistributedStateUserMBean.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/ds/DistributedStateUserMBean.java	                        (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/ds/DistributedStateUserMBean.java	2008-03-21 03:11:16 UTC (rev 71114)
@@ -0,0 +1,38 @@
+/*
+ * 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.ds;
+
+public interface DistributedStateUserMBean extends IDistributedState
+{
+   public abstract String getPartitionName();
+
+   public abstract void setPartitionName(String partitionName);
+
+   public abstract String getCategory();
+
+   public abstract void setCategory(String category);
+
+   public abstract void start() throws Exception;
+
+   public abstract void stop();
+
+}
\ No newline at end of file

Modified: branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/partition/test/PartitionRestartUnitTestCase.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/partition/test/PartitionRestartUnitTestCase.java	2008-03-21 02:51:04 UTC (rev 71113)
+++ branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/partition/test/PartitionRestartUnitTestCase.java	2008-03-21 03:11:16 UTC (rev 71114)
@@ -44,6 +44,8 @@
  */
 public class PartitionRestartUnitTestCase extends JBossClusteredTestCase
 {
+   private static final String PARTITION_NAME = System.getProperty("jbosstest.partitionName", "DefaultPartition");
+   
    /**
     * Create a new PartitionRestartUnitTestCase.
     * 
@@ -143,7 +145,7 @@
    
    protected void restartPartition(RMIAdaptor adaptor) throws Exception
    {
-      ObjectName partition = new ObjectName("jboss:service=DefaultPartition");
+      ObjectName partition = new ObjectName("jboss:service=" + PARTITION_NAME);
       
       Object[] params = new Object[0];
       String[] types = new String[0];
@@ -158,13 +160,13 @@
    
    protected Set getChannelMBeans(RMIAdaptor adaptor) throws Exception
    {
-      ObjectName on = new ObjectName("jboss.jgroups:type=channel,cluster=DefaultPartition");
+      ObjectName on = new ObjectName("jboss.jgroups:type=channel,cluster=" + PARTITION_NAME);
       return adaptor.queryNames(on, null);
    }
    
    protected Set getProtocolMBeans(RMIAdaptor adaptor) throws Exception
    {
-      ObjectName on = new ObjectName("jboss.jgroups:*,type=protocol,cluster=DefaultPartition");
+      ObjectName on = new ObjectName("jboss.jgroups:*,type=protocol,cluster=" + PARTITION_NAME);
       return adaptor.queryNames(on, null);
    }
 

Modified: branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/test/DRMTestCase.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/test/DRMTestCase.java	2008-03-21 02:51:04 UTC (rev 71113)
+++ branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/test/DRMTestCase.java	2008-03-21 03:11:16 UTC (rev 71114)
@@ -67,6 +67,7 @@
  */
 public class DRMTestCase extends JBossClusteredTestCase
 {
+   private static final String PARTITION_NAME = System.getProperty("jbosstest.partitionName", "DefaultPartition");
    private static final String SERVICEA = "serviceA";
    private static final String SERVICEB = "serviceB";
 	
@@ -540,7 +541,7 @@
       String[] servers = super.getServers();
       RMIAdaptorExt server0 = (RMIAdaptorExt) adaptors[0];
       log.info("server0: "+server0);
-      ObjectName clusterService = new ObjectName("jboss:service=DefaultPartition");
+      ObjectName clusterService = new ObjectName("jboss:service=" + PARTITION_NAME);
       Vector view0 = (Vector) server0.getAttribute(clusterService, "CurrentView");
       log.info("server0: CurrentView, "+view0);
       ObjectName drmService = new ObjectName("jboss.test:service=DRMTestCase");

Modified: branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/test/DistributedStateTestCase.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/test/DistributedStateTestCase.java	2008-03-21 02:51:04 UTC (rev 71113)
+++ branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/test/DistributedStateTestCase.java	2008-03-21 03:11:16 UTC (rev 71114)
@@ -44,6 +44,8 @@
  */
 public class DistributedStateTestCase extends JBossClusteredTestCase
 {
+   private static final String PARTITION_NAME = System.getProperty("jbosstest.partitionName", "DefaultPartition");
+   
    static class TestListener extends UnicastRemoteObject
       implements RMINotificationListener
    {
@@ -76,7 +78,7 @@
       RMIAdaptor[] adaptors = getAdaptors();
       RMIAdaptorExt server0 = (RMIAdaptorExt) adaptors[0];
       log.info("server0: "+server0);
-      ObjectName clusterService = new ObjectName("jboss:service=DefaultPartition");
+      ObjectName clusterService = new ObjectName("jboss:service=" + PARTITION_NAME);
       Vector view0 = (Vector) server0.getAttribute(clusterService, "CurrentView");
       log.info("server0: CurrentView, "+view0);
       ObjectName dsService = new ObjectName("jboss.test:service=DistributedStateTestCase");

Modified: branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/test/HAJndiTestCase.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/test/HAJndiTestCase.java	2008-03-21 02:51:04 UTC (rev 71113)
+++ branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/test/HAJndiTestCase.java	2008-03-21 03:11:16 UTC (rev 71114)
@@ -32,6 +32,7 @@
 import org.jboss.test.cluster.ejb.CalledHome;
 import org.jboss.test.cluster.ejb.CalledRemote;
 import org.jboss.test.JBossClusteredTestCase;
+import org.jnp.interfaces.NamingContext;
 
 /**
  * HA-JNDI clustering tests.
@@ -50,6 +51,7 @@
    private static final String NODE1_HAJNDI = System.getProperty("node1.hajndi.url");
    private static final String DISCOVERY_GROUP = System.getProperty("jbosstest.udpGroup");
    private static final String DISCOVERY_TTL = System.getProperty("jbosstest.udp.ip_ttl", "1");
+   private static final String DISCOVERY_PARTITION = System.getProperty("jbosstest.partitionName");
    
    // BINDING KEYS and VALUES
    private static final String LOCAL0_KEY = "org.jboss.test.cluster.test.Local0Key";
@@ -341,18 +343,25 @@
       env.setProperty(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
       // Don't let the discovery packet off the test server so we don't
       // get spurious responses from other servers on the network
-      env.setProperty("jnp.discoveryTTL", DISCOVERY_TTL);
+      env.setProperty(NamingContext.JNP_DISCOVERY_TTL, DISCOVERY_TTL);
 
       if (autoDisabled)
       {
-         env.put("jnp.disableDiscovery", "true");
+         env.put(NamingContext.JNP_DISABLE_DISCOVERY, "true");
       }
-      else if (DISCOVERY_GROUP != null && "".equals(DISCOVERY_GROUP) == false)
+      else 
       {
-         // USe the multicast address this test environment is using
-         env.put("jnp.discoveryGroup", DISCOVERY_GROUP);
-      }
-        
+         if (DISCOVERY_GROUP != null && "".equals(DISCOVERY_GROUP) == false)      
+         {
+            // Use the multicast address this test environment is using
+            env.put(NamingContext.JNP_DISCOVERY_GROUP, DISCOVERY_GROUP);
+         }
+         if (DISCOVERY_PARTITION != null && "".equals(DISCOVERY_PARTITION) == false)
+         {
+            // Limit to the partition this test environment is using
+            env.put(NamingContext.JNP_PARTITION_NAME, DISCOVERY_PARTITION);
+         }
+      }  
       Context naming = new InitialContext (env);
       return naming;
 

Modified: branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/testbeancluster/test/RetryInterceptorUnitTestCase.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/testbeancluster/test/RetryInterceptorUnitTestCase.java	2008-03-21 02:51:04 UTC (rev 71113)
+++ branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/testbeancluster/test/RetryInterceptorUnitTestCase.java	2008-03-21 03:11:16 UTC (rev 71114)
@@ -48,6 +48,7 @@
 import org.jboss.test.testbeancluster.interfaces.StatefulSession;
 import org.jboss.test.testbeancluster.interfaces.StatelessSession;
 import org.jboss.test.testbeancluster.interfaces.StatelessSessionHome;
+import org.jnp.interfaces.NamingContext;
 
 /**
  * Tests the RetryInterceptor.
@@ -59,6 +60,7 @@
 {   
    private static final String DISCOVERY_TTL = System.getProperty("jbosstest.udp.ip_ttl", "1");
    private static final String DISCOVERY_GROUP = System.getProperty("jbosstest.udpGroup");
+   private static final String DISCOVERY_PARTITION = System.getProperty("jbosstest.partitionName");
    
    private static File customJndiDir = null;
    private static File customJndiProperties = null;
@@ -508,6 +510,11 @@
          // The server isn't listening on the std multicast address
          writer.write("jnp.discoveryGroup=" + DISCOVERY_GROUP);
       }
+      if (DISCOVERY_PARTITION != null && "".equals(DISCOVERY_PARTITION) == false)
+      {
+         // Limit to the partition this test environment is using
+         writer.write(NamingContext.JNP_PARTITION_NAME + "=" + DISCOVERY_PARTITION);
+      }
       writer.close();
       getLog().debug("Created custom jndi.properties at " + customJndiProperties + 
                      " -- DISCOVERY_GROUP is " + DISCOVERY_GROUP);
@@ -573,11 +580,18 @@
       {
          env.setProperty("jnp.disableDiscovery", "true");
       }
-      else if (DISCOVERY_GROUP != null && "".equals(DISCOVERY_GROUP) == false)
       {
-         // Use the multicast address this test environment is using
-         env.put("jnp.discoveryGroup", DISCOVERY_GROUP);
-      }
+         if (DISCOVERY_GROUP != null && "".equals(DISCOVERY_GROUP) == false)      
+         {
+            // Use the multicast address this test environment is using
+            env.put(NamingContext.JNP_DISCOVERY_GROUP, DISCOVERY_GROUP);
+         }
+         if (DISCOVERY_PARTITION != null && "".equals(DISCOVERY_PARTITION) == false)
+         {
+            // Limit to the partition this test environment is using
+            env.put(NamingContext.JNP_PARTITION_NAME, DISCOVERY_PARTITION);
+         }
+      }  
       
       return env;
    }

Modified: branches/JBPAPP_4_2_0_GA_CP/testsuite/src/resources/cluster/drm/jboss-service.xml
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/testsuite/src/resources/cluster/drm/jboss-service.xml	2008-03-21 02:51:04 UTC (rev 71113)
+++ branches/JBPAPP_4_2_0_GA_CP/testsuite/src/resources/cluster/drm/jboss-service.xml	2008-03-21 03:11:16 UTC (rev 71114)
@@ -5,89 +5,12 @@
 
 <server>
    <mbean code="org.jboss.test.cluster.drm.DRMUser"
-      name="jboss.test:service=DRMTestCase"
-      xmbean-dd="">
-      <xmbean>
-         <description>DistributedReplicantManager XMBean</description>
-
-         <!-- Attributes -->
-         <attribute access="read-write" getMethod="getPartitionName" setMethod="setPartitionName">
-            <description>The cluster partition name</description>
-            <name>PartitionName</name>
-            <type>java.lang.String</type>
-            <descriptors>
-               <value value="DefaultPartition" />
-            </descriptors>
-         </attribute>
-         <attribute access="read-write" getMethod="getCategory" setMethod="setCategory">
-            <description>The category used with the DRM binding</description>
-            <name>Category</name>
-            <type>java.lang.String</type>
-            <descriptors>
-               <value value="DRMUser" />
-            </descriptors>
-         </attribute>
-
-         <!-- Operations -->
-         <operation>
-            <description>The start lifecycle operation</description>
-            <name>start</name>
-         </operation>
-         <operation>
-            <description>The stop lifecycle operation</description>
-            <name>stop</name>
-         </operation>
-
-         <operation>
-            <name>lookupLocalReplicant</name>
-            <return-type>java.io.Serializable</return-type>
-         </operation>
-         <operation>
-            <name>lookupLocalReplicant</name>
-            <parameter>
-               <name>key</name>
-               <type>java.lang.String</type>
-            </parameter>
-            <return-type>java.io.Serializable</return-type>
-         </operation>
-         <operation>
-            <name>lookupLocalReplicant</name>
-            <return-type>java.io.Serializable</return-type>
-         </operation>
-         <operation>
-            <name>lookupReplicants</name>
-            <return-type>java.util.List</return-type>
-         </operation>
-         <operation>
-            <name>lookupReplicants</name>
-            <parameter>
-               <name>key</name>
-               <type>java.lang.String</type>
-            </parameter>
-            <return-type>java.util.List</return-type>
-         </operation>
-         <operation>
-            <name>add</name>
-            <parameter>
-               <name>key</name>
-               <type>java.lang.String</type>
-            </parameter>
-            <parameter>
-               <name>data</name>
-               <type>java.io.Serializable</type>
-            </parameter>
-            <return-type>void</return-type>
-         </operation>
-         <operation>
-            <name>remove</name>
-            <parameter>
-               <name>key</name>
-               <type>java.lang.String</type>
-            </parameter>
-            <return-type>void</return-type>
-         </operation>
-      </xmbean>
-      <depends>jboss:service=DefaultPartition</depends>
+      name="jboss.test:service=DRMTestCase">
+      
+      <attribute name="PartitionName">${jboss.partition.name:DefaultPartition}</attribute>
+      <attribute name="Category">DRMUser</attribute>
+      
+      <depends>jboss:service=${jboss.partition.name:DefaultPartition}</depends>
    </mbean>
 
 </server>

Modified: branches/JBPAPP_4_2_0_GA_CP/testsuite/src/resources/cluster/ds/jboss-service.xml
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/testsuite/src/resources/cluster/ds/jboss-service.xml	2008-03-21 02:51:04 UTC (rev 71113)
+++ branches/JBPAPP_4_2_0_GA_CP/testsuite/src/resources/cluster/ds/jboss-service.xml	2008-03-21 03:11:16 UTC (rev 71114)
@@ -5,96 +5,11 @@
 
 <server>
    <mbean code="org.jboss.test.cluster.ds.DistributedStateUser"
-      name="jboss.test:service=DistributedStateTestCase"
-      xmbean-dd="">
-      <xmbean>
-         <description>DistributedState XMBean</description>
-         <class>org.jboss.test.cluster.ds.DistributedStateUser</class>
-
-         <!-- Attributes -->
-         <attribute access="read-write" getMethod="getPartitionName" setMethod="setPartitionName">
-            <description>The cluster partition name</description>
-            <name>PartitionName</name>
-            <type>java.lang.String</type>
-            <descriptors>
-               <value value="DefaultPartition" />
-            </descriptors>
-         </attribute>
-         <attribute access="read-write" getMethod="getCategory" setMethod="setCategory">
-            <description>The category used with the DistributedState map</description>
-            <name>Category</name>
-            <type>java.lang.String</type>
-            <descriptors>
-               <value value="DistributedStateTestCase" />
-            </descriptors>
-         </attribute>
-
-         <!-- Operations -->
-         <operation>
-            <description>The start lifecycle operation</description>
-            <name>start</name>
-         </operation>
-         <operation>
-            <description>The stop lifecycle operation</description>
-            <name>stop</name>
-         </operation>
-
-         <operation>
-            <name>get</name>
-            <parameter>
-               <name>key</name>
-               <type>java.io.Serializable</type>
-            </parameter>
-            <return-type>java.io.Serializable</return-type>
-         </operation>
-         <operation>
-            <name>put</name>
-            <parameter>
-               <name>key</name>
-               <type>java.io.Serializable</type>
-            </parameter>
-            <parameter>
-               <name>value</name>
-               <type>java.io.Serializable</type>
-            </parameter>
-         </operation>
-         <operation>
-            <description>An operation that returns the current date prefixed by
-            the input argument</description>
-            <name>remove</name>
-            <parameter>
-               <name>key</name>
-               <type>java.io.Serializable</type>
-            </parameter>
-         </operation>
-         <operation>
-            <name>flush</name>
-         </operation>
-         <operation>
-            <name>size</name>
-            <return-type>int</return-type>
-         </operation>
-          <operation>
-            <name>listAllCategories</name>
-            <return-type>java.util.Collection</return-type>
-         </operation>
-         <operation>
-            <name>listAllKeys</name>
-            <parameter>
-               <name>category</name>
-               <type>java.lang.String</type>
-            </parameter>
-            <return-type>java.util.Collection</return-type>
-         </operation>
-        <operation>
-            <name>listAllValues</name>
-            <parameter>
-               <name>category</name>
-               <type>java.lang.String</type>
-            </parameter>
-            <return-type>java.util.Collection</return-type>
-         </operation>
-      </xmbean>
+      name="jboss.test:service=DistributedStateTestCase">
+      
+      <attribute name="PartitionName">${jboss.partition.name:DefaultPartition}</attribute>
+      <attribute name="Category">DistributedStateTestCase</attribute>
+      
    </mbean>
 
 </server>

Modified: branches/JBPAPP_4_2_0_GA_CP/testsuite/src/resources/jmx/ha/META-INF/jboss-service.xml
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/testsuite/src/resources/jmx/ha/META-INF/jboss-service.xml	2008-03-21 02:51:04 UTC (rev 71113)
+++ branches/JBPAPP_4_2_0_GA_CP/testsuite/src/resources/jmx/ha/META-INF/jboss-service.xml	2008-03-21 03:11:16 UTC (rev 71114)
@@ -7,7 +7,7 @@
       name="jboss.test:service=ProxyFactory,name=HAService,protocol=jrmpha">
 
       <!-- Use the default partition -->
-      <depends optional-attribute-name="PartitionObjectName">jboss:service=DefaultPartition</depends>
+      <depends optional-attribute-name="PartitionObjectName">jboss:service=${jboss.partition.name:DefaultPartition}</depends>
 
       <!-- Use the standard JRMPInvoker from conf/jboss-service.xml -->
       <depends optional-attribute-name="InvokerName">jboss:service=invoker,type=jrmpha</depends>

Modified: branches/JBPAPP_4_2_0_GA_CP/testsuite/src/resources/testbeancluster/cif-jboss.xml
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/testsuite/src/resources/testbeancluster/cif-jboss.xml	2008-03-21 02:51:04 UTC (rev 71113)
+++ branches/JBPAPP_4_2_0_GA_CP/testsuite/src/resources/testbeancluster/cif-jboss.xml	2008-03-21 03:11:16 UTC (rev 71114)
@@ -9,7 +9,7 @@
          <ejb-name>cif.StatefulSession</ejb-name>
          <clustered>true</clustered>
          <cluster-config>
-            <partition-name>DefaultPartition</partition-name>
+            <partition-name>${jboss.partition.name:DefaultPartition}</partition-name>
             <home-load-balance-policy>org.jboss.ha.framework.interfaces.RandomRobin</home-load-balance-policy>
             <bean-load-balance-policy>org.jboss.ha.framework.interfaces.RoundRobin</bean-load-balance-policy>
          </cluster-config>




More information about the jboss-cvs-commits mailing list