[jboss-cvs] JBossAS SVN: r74041 - in branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test: cluster/jmx/test and 5 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Jun 3 18:10:55 EDT 2008


Author: galder.zamarreno at jboss.com
Date: 2008-06-03 18:10:55 -0400 (Tue, 03 Jun 2008)
New Revision: 74041

Removed:
   branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/JBossClusteredTestCase.java
   branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/JBossTestClusteredServices.java
   branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/JBossTestClusteredSetup.java
Modified:
   branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/jmx/test/HAInvokerUnitTestCase.java
   branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/partition/test/BadStateTransferTestCase.java
   branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/partition/test/JBAS4406UnitTestCase.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/FieldBasedTestCase.java
   branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/test/HASingletonElectionPolicyTestCase.java
   branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/test/SessionTestUtil.java
   branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/test/SimpleTestCase.java
   branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/test/StateTransferTestCase.java
   branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/test/UndeployTestCase.java
   branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/jbossmessaging/clustertest/ClusteredTestCase.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/main/org/jboss/test/testbeancluster/test/StatefulPassivationExpirationUnitTestCase.java
   branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/web/test/ClusteredSingleSignOnUnitTestCase.java
Log:
[JBPAPP-865] Refactored JBossClusteredTestCase out of testsuite/ into test/ and changed all references from RMIAdaptor to MBeanServerConnection.

Deleted: branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/JBossClusteredTestCase.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/JBossClusteredTestCase.java	2008-06-03 22:08:05 UTC (rev 74040)
+++ branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/JBossClusteredTestCase.java	2008-06-03 22:10:55 UTC (rev 74041)
@@ -1,178 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, 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;
-
-import java.util.StringTokenizer;
-
-import org.jboss.jmx.adaptor.rmi.RMIAdaptor;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-/**
- * Derived implementation of JBossTestCase for cluster testing.
- *
- * @author <a href="mailto:sacha.labourey at cogito-info.ch">Sacha Labourey</a>.
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- * @see org.jboss.test.JBossTestCase
- */
-public class JBossClusteredTestCase extends JBossTestCase
-{
-   JBossTestClusteredServices clusterServices;
-
-   public JBossClusteredTestCase(String name)
-   {
-      super(name);
-   }
-
-   public void initDelegate()
-   {
-      clusterServices = new JBossTestClusteredServices(getClass().getName());
-      delegate = clusterServices;
-   }
-   
-   // Public --------------------------------------------------------
-   
-   public void testServerFound() throws Exception
-   {
-      if (deploymentException != null)
-         throw deploymentException;
-      assertTrue("Server was not found", getServers() != null);
-   }
-
-
-   public RMIAdaptor[] getAdaptors() throws Exception
-   {
-      return clusterServices.getAdaptors();
-   }
-
-   public String[] getServers() throws Exception
-   {
-      return clusterServices.getServers();
-   }
-
-   public String[] getNamingURLs() throws Exception
-   {
-      return clusterServices.getNamingURLs();
-   }
-   public String[] getHANamingURLs() throws Exception
-   {
-      return clusterServices.getHANamingURLs();
-   }
-   public String[] getHttpURLs() throws Exception
-   {
-      return clusterServices.getHttpURLs();
-   }
-
-   protected void deploy(RMIAdaptor server, String name) throws Exception
-   {
-      clusterServices.deploy(server, name);
-   }
-
-   protected void redeploy(RMIAdaptor server, String name) throws Exception
-   {
-      clusterServices.redeploy(server, name);
-   }
-
-   protected void undeploy(RMIAdaptor server, String name) throws Exception
-   {
-      clusterServices.undeploy(server, name);
-   }
-
-   public static Test getDeploySetup(final Test test, final String jarNames)
-      throws Exception
-   {
-      JBossTestSetup wrapper = new JBossTestClusteredSetup(test)
-      {
-
-         protected void setUp() throws Exception
-         {
-            if (jarNames == null) return;
-            deploymentException = null;
-            try
-            {
-               // deploy the comma seperated list of jars
-               StringTokenizer st = new StringTokenizer(jarNames, ", ");
-               while (st != null && st.hasMoreTokens())
-               {
-                  String jarName = st.nextToken();
-                  this.redeploy(jarName);
-                  this.getLog().debug("deployed package: " + jarName);
-               }
-            }
-            catch (Exception ex)
-            {
-               // Throw this in testServerFound() instead.
-               deploymentException = ex;
-            }
-                
-            // wait a few seconds so that the cluster stabilize
-            synchronized (this)
-            {
-               wait(2000);
-            }
-         }
-
-         protected void tearDown() throws Exception
-         {
-            if (jarNames != null)
-            {
-               // deploy the comma seperated list of jars
-               StringTokenizer st = new StringTokenizer(jarNames, ", ");
-               String[] depoyments = new String[st.countTokens()];
-               for (int i = depoyments.length - 1; i >= 0; i--)
-                  depoyments[i] = st.nextToken();
-               for (int i = 0; i < depoyments.length; i++)
-               {
-                  String jarName = depoyments[i];
-                  this.getLog().debug("Attempt undeploy of " + jarName);
-                  this.undeploy(jarName);
-                  this.getLog().debug("undeployed package: " + jarName);
-               }            
-            }
-         }
-      };
-      return wrapper;
-   }
-
-   public static Test getDeploySetup(final Class clazz, final String jarName)
-      throws Exception
-   {
-      TestSuite suite = new TestSuite();
-      suite.addTest(new TestSuite(clazz));
-      return getDeploySetup(suite, jarName);
-   }
-
-   /**
-    * anil
-    */
-   public void setServerNames(String[] snames) throws Exception
-   {
-      ((JBossTestClusteredServices) delegate).setServerNames(snames);
-   }
-
-   // Private -------------------------------------------------------
-   
-   // Inner classes -------------------------------------------------
-
-}

Deleted: branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/JBossTestClusteredServices.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/JBossTestClusteredServices.java	2008-06-03 22:08:05 UTC (rev 74040)
+++ branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/JBossTestClusteredServices.java	2008-06-03 22:10:55 UTC (rev 74041)
@@ -1,312 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, 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;
-
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Hashtable;
-
-import javax.management.ObjectName;
-import javax.naming.InitialContext;
-
-import org.jboss.jmx.adaptor.rmi.RMIAdaptor;
-
-/**
- * Derived implementation of JBossTestServices for cluster testing.
- *
- * @author <a href="mailto:sacha.labourey at cogito-info.ch">Sacha Labourey</a>.
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- * @see org.jboss.test.JBossTestServices
- */
-public class JBossTestClusteredServices extends JBossTestServices
-{
-   protected ArrayList adaptors = null;
-   protected ArrayList servers = null;
-   protected ArrayList namingURLs = null;
-   protected ArrayList namingURLsHA = null;
-   protected ArrayList httpURLs = null;
-   
-   // Constructors --------------------------------------------------
-   
-   public JBossTestClusteredServices(String className)
-   {
-      super(className);
-   }
-
-   public int getServerCount()
-   {
-      return servers.size();
-   }
-
-   RMIAdaptor[] getAdaptors() throws Exception
-   {
-      init();
-      RMIAdaptor[] tmp = new RMIAdaptor[adaptors.size()];
-      adaptors.toArray(tmp);
-      return tmp;
-   }
-   
-   public RMIAdaptor getAdaptor(int index) throws Exception
-   {
-      init();
-      RMIAdaptor adaptor = (RMIAdaptor) adaptors.get(index);
-      return adaptor;
-   }
-
-   public String[] getServers() throws Exception
-   {
-      init();
-      String[] tmp = new String[servers.size()];
-      servers.toArray(tmp);
-      return tmp;
-   }
-   String getServer(int index) throws Exception
-   {
-      init();
-      String server = (String) servers.get(index);
-      return server;
-   }
-
-   /** Get the JNDI provider urls for the cluster nodes
-    * @return
-    * @throws Exception
-    */ 
-   String[] getNamingURLs() throws Exception
-   {
-      init();
-      String[] tmp = new String[namingURLs.size()];
-      namingURLs.toArray(tmp);
-      return tmp;
-   }
-   String getNamingURL(int index) throws Exception
-   {
-      init();
-      String server = (String) namingURLs.get(index);
-      return server;
-   }
-
-   /** Get the JNDI provider urls for the cluster nodes
-    * @return
-    * @throws Exception
-    */ 
-   String[] getHANamingURLs() throws Exception
-   {
-      init();
-      String[] tmp = new String[namingURLsHA.size()];
-      namingURLsHA.toArray(tmp);
-      return tmp;
-   }
-   String getHANamingURL(int index) throws Exception
-   {
-      init();
-      String server = (String) namingURLsHA.get(index);
-      return server;
-   }
-
-   /** Get the default web container urls for the cluster nodes
-    * @return
-    * @throws Exception
-    */ 
-   String[] getHttpURLs() throws Exception
-   {
-      init();
-      String[] tmp = new String[httpURLs.size()];
-      httpURLs.toArray(tmp);
-      return tmp;
-   }
-   String getHttpURL(int index) throws Exception
-   {
-      init();
-      String server = (String) httpURLs.get(index);
-      return server;
-   }
-
-   /**
-    * Deploy a package on the given server with the main deployer. The supplied 
-    * name is interpreted as a url, or as a filename in jbosstest.deploy.lib or 
-    * ../lib.
-    *
-    * @param server         server on which the package should be deployed
-    * @param name           filename/url of package to deploy.
-    * @exception Exception  Description of Exception
-    */
-   public void deploy(RMIAdaptor server, String name) throws Exception
-   {
-      if (Boolean.getBoolean("jbosstest.nodeploy") == true)
-      {
-         log.debug("Skipping deployment of: " + name);
-         return;
-      }
-
-      URL deployURL = getDeployURL(name);
-      log.debug("Deploying " + name + ", url=" + deployURL  + " to " + server);
-      invoke(server,
-            getDeployerName(),
-            "deploy",
-            new Object[]{deployURL},
-            new String[]{"java.net.URL"});
-   }
-   
-   public void redeploy(RMIAdaptor server, String name) throws Exception
-   {
-      if (Boolean.getBoolean("jbosstest.nodeploy") == true)
-      {
-         log.debug("Skipping redeployment of: " + name);
-         return;
-      }
-
-      URL deployURL = getDeployURL(name);
-      log.debug("Deploying " + name + ", url=" + deployURL);
-      invoke(server,
-         getDeployerName(),
-         "redeploy",
-         new Object[]{deployURL},
-         new String[]{"java.net.URL"});
-   }
-
-   /**
-    * Undeploy a package from the given server with the main deployer. 
-    * The supplied name is interpreted as a url, or as a filename in 
-    * jbosstest.deploy.lib or ../lib.
-    *
-    * @param server         server on which the package should be deployed
-    * @param name           filename/url of package to undeploy.
-    * @exception Exception  Description of Exception
-    */
-   public void undeploy(RMIAdaptor server, String name) throws Exception
-   {
-      if (Boolean.getBoolean("jbosstest.nodeploy") == true)
-         return;
-      URL deployURL = getDeployURL(name);
-      log.debug("Undeploying " + name + ", url=" + deployURL);
-      Object[] args = {deployURL};
-      String[] sig = {"java.net.URL"};
-      invoke(server, getDeployerName(), "undeploy", args, sig);
-   }
-
-   /**
-    * Override to invoke the operation on all servers
-    *
-    * @param name
-    * @param method
-    * @param args
-    * @param sig
-    * @return
-    * @throws Exception
-    */
-   protected Object invoke(ObjectName name, String method, Object[] args,
-      String[] sig)
-      throws Exception
-   {
-      RMIAdaptor[] adaptors = getAdaptors();
-
-      Object result = null;
-      for (int i = 0; i < adaptors.length; i++)
-      {
-         RMIAdaptor adaptor = adaptors[i];
-         log.debug("Using RMIAdaptor: "+adaptor);
-         result = invoke(adaptor, name, method, args, sig);
-      }
-
-      return result;
-
-   }
-
-   public void init() throws Exception
-   {
-      if (initialContext == null)
-      {
-         initialContext = new InitialContext();
-      }
-      if (adaptors == null)
-      {
-         adaptors = new ArrayList();
-         servers = new ArrayList();
-         namingURLs = new ArrayList();
-         namingURLsHA = new ArrayList();
-         httpURLs = new ArrayList();
-         String adaptorName = System.getProperty("jbosstest.server.name");
-         if (adaptorName == null)
-            adaptorName = "jmx/invoker/RMIAdaptor";
-
-         Hashtable env = new Hashtable();
-         env.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
-         env.put("java.naming.factory.url.pkgs", "org.jnp.interfaces");
-
-         // Look for jbosstest.cluster.nodeN properties for the server names
-         String node = "jbosstest.cluster.node";
-         int count = 0;
-         while (count < 10)
-         {
-            String prop = node + count;
-            String host = System.getProperty(prop);
-            count++;
-            if (host == null)
-               break;
-            log.info(prop + " = " + host);
-            servers.add(host);
-            // See if there is a jbosstest.cluster.nodeN.jndi.url
-            String urlProp = prop + ".jndi.url";
-            String urlDefault = "jnp://" + host + ":1099";
-            String urlValue = System.getProperty(urlProp, urlDefault);
-            log.debug("JNDI Url for node=" + count + " is:" + urlValue);
-            namingURLs.add(urlValue);
-            env.put("java.naming.provider.url", urlValue);
-            // Lookup the adaptor
-            InitialContext tmpCtx = new InitialContext(env);
-            RMIAdaptor adaptor = (RMIAdaptor) tmpCtx.lookup(adaptorName);
-            adaptors.add(adaptor);
-
-            // See if there is a jbosstest.cluster.nodeN.hajndi.url
-            urlProp = prop + ".hajndi.url";
-            urlDefault = "jnp://" + host + ":1100";
-            urlValue = System.getProperty(urlProp, urlDefault);
-            log.debug("HA-JNDI Url for node=" + count + " is:" + urlValue);
-            namingURLsHA.add(urlValue);
-            
-            // See if there is a jbosstest.cluster.nodeN.http.url
-            urlProp = prop + ".http.url";
-            urlDefault = "http://" + host + ":8080";
-            urlValue = System.getProperty(urlProp, urlDefault);
-            log.debug("Http Url for node=" + count + " is:" + urlValue);
-            httpURLs.add(urlValue);
-         }
-
-         if (adaptors.size() == 0)
-            throw new IllegalStateException("No jbosstest.cluster.node values found");
-      }
-   }
-
-   /**
-    * This method gives overriding testcases to set the cluster servernames
-    */
-   public void setServerNames(String[] snames)
-   {
-      if (snames == null) return;
-      for (int i = 0; i < snames.length; i++)
-      {
-         servers.add(snames[i]);
-      }
-   }
-
-}

Deleted: branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/JBossTestClusteredSetup.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/JBossTestClusteredSetup.java	2008-06-03 22:08:05 UTC (rev 74040)
+++ branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/JBossTestClusteredSetup.java	2008-06-03 22:10:55 UTC (rev 74041)
@@ -1,78 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, 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;
-
-import junit.framework.Test;
-
-/**
- * Derived implementation of JBossTestSetup for cluster testing.
- *
- * @see org.jboss.test.JBossTestSetup
- *
- * @author  <a href="mailto:sacha.labourey at cogito-info.ch">Sacha Labourey</a>.
- * @version $Revision$
- *
- * <p><b>Revisions:</b>
- *
- * <p><b>12 avril 2002 Sacha Labourey:</b>
- * <ul>
- * <li> First implementation </li>
- * </ul>
- */
-
-public class JBossTestClusteredSetup extends JBossTestSetup
-{
-   
-   // Constants -----------------------------------------------------
-   
-   // Attributes ----------------------------------------------------
-   
-   // Static --------------------------------------------------------
-   
-   // Constructors --------------------------------------------------
-   
-   public JBossTestClusteredSetup(Test test) throws Exception
-   {
-      super(test);
-   }
-   
-   
-   // Public --------------------------------------------------------
-   
-   // Z implementation ----------------------------------------------
-   
-   // Y overrides ---------------------------------------------------
-   
-   // Package protected ---------------------------------------------
-   
-   // Protected -----------------------------------------------------
-   
-   protected JBossTestServices createTestServices()
-   {
-      return new JBossTestClusteredServices(getClass().getName());
-   }
-
-   // Private -------------------------------------------------------
-   
-   // Inner classes -------------------------------------------------
-   
-}

Modified: branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/jmx/test/HAInvokerUnitTestCase.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/jmx/test/HAInvokerUnitTestCase.java	2008-06-03 22:08:05 UTC (rev 74040)
+++ branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/jmx/test/HAInvokerUnitTestCase.java	2008-06-03 22:10:55 UTC (rev 74041)
@@ -23,6 +23,7 @@
 
 import java.util.Properties;
 
+import javax.management.MBeanServerConnection;
 import javax.naming.Context;
 import javax.naming.InitialContext;
 
@@ -37,6 +38,7 @@
  * Tests for ha invoker.
  *
  * @author <a href="mailto:brian.stansberry at jboss.com">Brian Stansberry</a>
+ * @author <a href="mailto:galder.zamarreno at jboss.com">Galder Zamarreno</a>
  * @version $Revision$
  */
 public class HAInvokerUnitTestCase
@@ -103,7 +105,7 @@
 
    protected void configureCluster() throws Exception
    {
-      RMIAdaptor[] adaptors = getAdaptors();
+      MBeanServerConnection[] adaptors = getAdaptors();
       String warName = getDeploymentName();
       if (!deployed0_)
       {
@@ -123,7 +125,7 @@
    
    protected void reconfigureCluster() throws Exception
    {
-      RMIAdaptor[] adaptors = getAdaptors();
+      MBeanServerConnection[] adaptors = getAdaptors();
       if (!deployed1_)
       {
          deploy(adaptors[1], getDeploymentName());

Modified: branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/partition/test/BadStateTransferTestCase.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/partition/test/BadStateTransferTestCase.java	2008-06-03 22:08:05 UTC (rev 74040)
+++ branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/partition/test/BadStateTransferTestCase.java	2008-06-03 22:10:55 UTC (rev 74041)
@@ -22,6 +22,7 @@
 
 import java.util.Vector;
 
+import javax.management.MBeanServerConnection;
 import javax.management.ObjectName;
 
 import junit.framework.Test;
@@ -56,7 +57,7 @@
    
    public void testFailedStateProvider() throws Exception
    {
-      RMIAdaptor[] adaptors = getAdaptors();
+      MBeanServerConnection[] adaptors = getAdaptors();
       
       ObjectName partition = new ObjectName("jboss:service=BadProviderPartition");
       
@@ -81,7 +82,7 @@
 
    public void testBadStateIntegration() throws Exception
    {
-      RMIAdaptor[] adaptors = getAdaptors();
+      MBeanServerConnection[] adaptors = getAdaptors();
       
       ObjectName partition = new ObjectName("jboss:service=BadStatePartition");
       

Modified: branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/partition/test/JBAS4406UnitTestCase.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/partition/test/JBAS4406UnitTestCase.java	2008-06-03 22:08:05 UTC (rev 74040)
+++ branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/partition/test/JBAS4406UnitTestCase.java	2008-06-03 22:10:55 UTC (rev 74041)
@@ -23,6 +23,7 @@
 
 import java.util.Set;
 
+import javax.management.MBeanServerConnection;
 import javax.management.ObjectName;
 
 import junit.framework.Test;
@@ -34,6 +35,7 @@
  * A PartitionRestartUnitTestCase.
  * 
  * @author <a href="mailto://brian.stansberry@jboss.com">Brian Stansberry</a>
+ * @author <a href="mailto:galder.zamarreno at jboss.com">Galder Zamarreno</a>
  * @version $Revision$
  */
 public class JBAS4406UnitTestCase extends JBossClusteredTestCase
@@ -59,7 +61,7 @@
    {       
       getLog().debug("testMBeanRegistration");
       
-      RMIAdaptor[] adaptors = this.getAdaptors(); 
+      MBeanServerConnection[] adaptors = this.getAdaptors(); 
       
       Set channelMBean = getChannelMBeans(adaptors[0]);
       assertNotNull("Channel mbean registered", channelMBean);
@@ -95,7 +97,7 @@
       getLog().debug("ok");
    }
    
-   protected void stopPartition(RMIAdaptor adaptor) throws Exception
+   protected void stopPartition(MBeanServerConnection adaptor) throws Exception
    {
       ObjectName partition = new ObjectName("jboss:service=JBAS4406Partition");
       
@@ -106,13 +108,13 @@
       sleep(2000);
    }
    
-   protected Set getChannelMBeans(RMIAdaptor adaptor) throws Exception
+   protected Set getChannelMBeans(MBeanServerConnection adaptor) throws Exception
    {
       ObjectName on = new ObjectName("jboss.jgroups:type=channel,cluster=JBAS4406Partition");
       return adaptor.queryNames(on, null);
    }
    
-   protected Set getProtocolMBeans(RMIAdaptor adaptor) throws Exception
+   protected Set getProtocolMBeans(MBeanServerConnection adaptor) throws Exception
    {
       ObjectName on = new ObjectName("jboss.jgroups:*,type=protocol,cluster=JBAS4406Partition");
       return adaptor.queryNames(on, null);

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-06-03 22:08:05 UTC (rev 74040)
+++ branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/partition/test/PartitionRestartUnitTestCase.java	2008-06-03 22:10:55 UTC (rev 74041)
@@ -24,6 +24,7 @@
 import java.util.Properties;
 import java.util.Set;
 
+import javax.management.MBeanServerConnection;
 import javax.management.ObjectName;
 import javax.naming.Context;
 import javax.naming.InitialContext;
@@ -40,6 +41,7 @@
  * A PartitionRestartUnitTestCase.
  * 
  * @author <a href="mailto://brian.stansberry@jboss.com">Brian Stansberry</a>
+ * @author <a href="mailto:galder.zamarreno at jboss.com">Galder Zamarreno</a>
  * @version $Revision$
  */
 public class PartitionRestartUnitTestCase extends JBossClusteredTestCase
@@ -67,7 +69,7 @@
    {       
       getLog().debug("testStatefulBeanFailover");
       
-      RMIAdaptor[] adaptors = this.getAdaptors(); 
+      MBeanServerConnection[] adaptors = this.getAdaptors(); 
       
       Set channelMBean = getChannelMBeans(adaptors[0]);
       assertNotNull("Channel mbean registered", channelMBean);
@@ -143,7 +145,7 @@
    }
    
    
-   protected void restartPartition(RMIAdaptor adaptor) throws Exception
+   protected void restartPartition(MBeanServerConnection adaptor) throws Exception
    {
       ObjectName partition = new ObjectName("jboss:service=" + PARTITION_NAME);
       
@@ -158,13 +160,13 @@
       sleep(2000);
    }
    
-   protected Set getChannelMBeans(RMIAdaptor adaptor) throws Exception
+   protected Set getChannelMBeans(MBeanServerConnection adaptor) throws Exception
    {
       ObjectName on = new ObjectName("jboss.jgroups:type=channel,cluster=" + PARTITION_NAME);
       return adaptor.queryNames(on, null);
    }
    
-   protected Set getProtocolMBeans(RMIAdaptor adaptor) throws Exception
+   protected Set getProtocolMBeans(MBeanServerConnection adaptor) throws Exception
    {
       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-06-03 22:08:05 UTC (rev 74040)
+++ branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/test/DRMTestCase.java	2008-06-03 22:10:55 UTC (rev 74041)
@@ -32,6 +32,7 @@
 import java.util.Vector;
 
 import javax.management.MBeanServer;
+import javax.management.MBeanServerConnection;
 import javax.management.MBeanServerFactory;
 import javax.management.MBeanServerInvocationHandler;
 import javax.management.Notification;
@@ -63,6 +64,7 @@
  *
  * @author  Scott.Stark at jboss.org
  * @author  Brian.Stansberry at jboss.com
+ * @author <a href="mailto:galder.zamarreno at jboss.com">Galder Zamarreno</a>
  * @version $Revision$
  */
 public class DRMTestCase extends JBossClusteredTestCase
@@ -537,7 +539,7 @@
    {
       log.debug("+++ testStateReplication");
       log.info("java.rmi.server.hostname="+System.getProperty("java.rmi.server.hostname"));
-      RMIAdaptor[] adaptors = getAdaptors();
+      MBeanServerConnection[] adaptors = getAdaptors();
       String[] servers = super.getServers();
       RMIAdaptorExt server0 = (RMIAdaptorExt) adaptors[0];
       log.info("server0: "+server0);

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-06-03 22:08:05 UTC (rev 74040)
+++ branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/test/DistributedStateTestCase.java	2008-06-03 22:10:55 UTC (rev 74041)
@@ -25,6 +25,8 @@
 import java.rmi.server.UnicastRemoteObject;
 import java.util.Collection;
 import java.util.Vector;
+
+import javax.management.MBeanServerConnection;
 import javax.management.MBeanServerInvocationHandler;
 import javax.management.ObjectName;
 import javax.management.Notification;
@@ -40,6 +42,7 @@
 /** Tests of http session replication
  *
  * @author  Scott.Stark at jboss.org
+ * @author <a href="mailto:galder.zamarreno at jboss.com">Galder Zamarreno</a>
  * @version $Revision$
  */
 public class DistributedStateTestCase extends JBossClusteredTestCase
@@ -75,7 +78,7 @@
    {
       log.debug("+++ testStateReplication");
       
-      RMIAdaptor[] adaptors = getAdaptors();
+      MBeanServerConnection[] adaptors = getAdaptors();
       RMIAdaptorExt server0 = (RMIAdaptorExt) adaptors[0];
       log.info("server0: "+server0);
       ObjectName clusterService = new ObjectName("jboss:service=" + PARTITION_NAME);

Modified: branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/test/FieldBasedTestCase.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/test/FieldBasedTestCase.java	2008-06-03 22:08:05 UTC (rev 74040)
+++ branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/test/FieldBasedTestCase.java	2008-06-03 22:10:55 UTC (rev 74041)
@@ -21,6 +21,8 @@
  */
 package org.jboss.test.cluster.test;
 
+import javax.management.MBeanServerConnection;
+
 import junit.framework.Test;
 
 import org.apache.commons.httpclient.HttpClient;
@@ -33,6 +35,7 @@
  *
  * @author Ben Wang
  * @author Brian Stansberry
+ * @author <a href="mailto:galder.zamarreno at jboss.com">Galder Zamarreno</a>
  * @version $Id$
  */
 public class FieldBasedTestCase
@@ -84,7 +87,7 @@
       sessionID = stripJvmRoute(sessionID);
       String sessionFqn = "/JSESSION/localhost" + warName_ + sessionID;
       
-      RMIAdaptor[] adaptors = getAdaptors();
+      MBeanServerConnection[] adaptors = getAdaptors();
       
       // Get the session version from the cache
       Object origVersion = SessionTestUtil.getSessionVersion(adaptors[0], sessionFqn); 
@@ -149,7 +152,7 @@
       setCookieDomainToThisServer(client, servers_[0]);
       makeGet(client, baseURL0_ + removeUrl);
       
-      RMIAdaptor[] adaptors = getAdaptors();
+      MBeanServerConnection[] adaptors = getAdaptors();
       
       // Get the session from the cache
       Object origVersion = SessionTestUtil.getSessionVersion(adaptors[0], sessionFqn); 
@@ -225,7 +228,7 @@
       // Modify the data, as that's the JSP that adds the language collection
       makeGet(client, baseURL0_ + modifyUrl);
       
-      RMIAdaptor[] adaptors = getAdaptors();
+      MBeanServerConnection[] adaptors = getAdaptors();
       
       // Get the session version from the cache
       Object origVersion = SessionTestUtil.getSessionVersion(adaptors[0], sessionFqn); 

Modified: branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/test/HASingletonElectionPolicyTestCase.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/test/HASingletonElectionPolicyTestCase.java	2008-06-03 22:08:05 UTC (rev 74040)
+++ branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/test/HASingletonElectionPolicyTestCase.java	2008-06-03 22:10:55 UTC (rev 74041)
@@ -21,6 +21,7 @@
  */
 package org.jboss.test.cluster.test;
 
+import javax.management.MBeanServerConnection;
 import javax.management.ObjectName;
 
 import junit.framework.Test;
@@ -34,6 +35,7 @@
  *
  * @author <a href="mailto:Alex.Fu at novell.com">Alex Fu</a>
  * @author Brian Stansberry
+ * @author <a href="mailto:galder.zamarreno at jboss.com">Galder Zamarreno</a>
  * @version $Revision: 46010 $
  *
  */
@@ -53,7 +55,7 @@
    public void testElectionPolicy() throws Exception
    {
       // Get MBeanServerConnections
-      RMIAdaptor[] adaptors = this.getAdaptors();
+      MBeanServerConnection[] adaptors = this.getAdaptors();
       int size = adaptors.length;
       assertTrue(size == 2);   // cluster size must be 2 for 3rd policy test
       

Modified: branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/test/SessionTestUtil.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/test/SessionTestUtil.java	2008-06-03 22:08:05 UTC (rev 74040)
+++ branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/test/SessionTestUtil.java	2008-06-03 22:10:55 UTC (rev 74041)
@@ -24,6 +24,7 @@
 import java.util.Iterator;
 import java.util.Set;
 
+import javax.management.MBeanServerConnection;
 import javax.management.MalformedObjectNameException;
 import javax.management.ObjectName;
 
@@ -34,6 +35,7 @@
  * Utilities for session testing.
  * 
  * @author <a href="mailto://brian.stansberry@jboss.com">Brian Stansberry</a>
+ * @author <a href="mailto:galder.zamarreno at jboss.com">Galder Zamarreno</a>
  * @version $Revision$
  */
 public class SessionTestUtil
@@ -58,13 +60,13 @@
       }
    }
    
-   public static Object getSessionVersion(RMIAdaptor adaptor, String sessionFqn) throws Exception
+   public static Object getSessionVersion(MBeanServerConnection adaptor, String sessionFqn) throws Exception
    {
       return adaptor.invoke(CACHE_OBJECT_NAME, "get", new Object[]
       {sessionFqn, VERSION_KEY}, TYPES);
    }
 
-   public static Object getBuddySessionVersion(RMIAdaptor adaptor, String sessionFqn) throws Exception
+   public static Object getBuddySessionVersion(MBeanServerConnection adaptor, String sessionFqn) throws Exception
    {
       Object replVersion = null;
       //    Check in the buddy backup tree

Modified: branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/test/SimpleTestCase.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/test/SimpleTestCase.java	2008-06-03 22:08:05 UTC (rev 74040)
+++ branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/test/SimpleTestCase.java	2008-06-03 22:10:55 UTC (rev 74041)
@@ -21,6 +21,8 @@
  */
 package org.jboss.test.cluster.test;
 
+import javax.management.MBeanServerConnection;
+
 import junit.framework.Test;
 import org.apache.commons.httpclient.HttpClient;
 import org.jboss.jmx.adaptor.rmi.RMIAdaptor;
@@ -30,6 +32,7 @@
  * Simple clustering test case of get/set.
  *
  * @author Ben Wang
+ * @author <a href="mailto:galder.zamarreno at jboss.com">Galder Zamarreno</a>
  * @version $Revision: 1.0
  */
 public class SimpleTestCase
@@ -154,7 +157,7 @@
       sleepThread(45000);
       
       // Confirm 2nd session is gone from the distributed cache on node 0
-      RMIAdaptor[] adaptors = getAdaptors();
+      MBeanServerConnection[] adaptors = getAdaptors();
       assertEquals("Session gone from distributed cache for " + sessionFqn, 
             null,
             SessionTestUtil.getSessionVersion(adaptors[0], sessionFqn));

Modified: branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/test/StateTransferTestCase.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/test/StateTransferTestCase.java	2008-06-03 22:08:05 UTC (rev 74040)
+++ branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/test/StateTransferTestCase.java	2008-06-03 22:10:55 UTC (rev 74041)
@@ -25,6 +25,7 @@
 import java.util.Iterator;
 import java.util.Set;
 
+import javax.management.MBeanServerConnection;
 import javax.management.MalformedObjectNameException;
 import javax.management.ObjectName;
 
@@ -41,6 +42,7 @@
  * TODO add a concurrency test.
  * 
  * @author <a href="mailto://brian.stansberry@jboss.com">Brian Stansberry</a>
+ * @author <a href="mailto:galder.zamarreno at jboss.com">Galder Zamarreno</a>
  * @version $Revision$
  */
 public class StateTransferTestCase extends BaseTest
@@ -71,8 +73,8 @@
    protected String getUrlBase_;
    
    private ObjectName warObjectName;
-   private RMIAdaptor adaptor0_;
-   private RMIAdaptor adaptor1_;
+   private MBeanServerConnection adaptor0_;
+   private MBeanServerConnection adaptor1_;
    private String warFqn_;
    
    /**
@@ -112,7 +114,7 @@
                         "j2eeType=WebModule,name=//localhost/" + getWarName();
          warObjectName = new ObjectName(oname);
          
-         RMIAdaptor[] adaptors = getAdaptors();
+         MBeanServerConnection[] adaptors = getAdaptors();
          adaptor0_ = adaptors[0];
          adaptor1_ = adaptors[1];
          
@@ -196,7 +198,7 @@
       getLog().debug("Server0 has no cached sessions");
    }
    
-   private Set getSessionIds(RMIAdaptor adaptor) throws Exception
+   private Set getSessionIds(MBeanServerConnection adaptor) throws Exception
    {
       Set result = new HashSet();
       Set s = (Set) adaptor.invoke(CACHE_OBJECT_NAME, 

Modified: branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/test/UndeployTestCase.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/test/UndeployTestCase.java	2008-06-03 22:08:05 UTC (rev 74040)
+++ branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/cluster/test/UndeployTestCase.java	2008-06-03 22:10:55 UTC (rev 74041)
@@ -21,6 +21,8 @@
  */
 package org.jboss.test.cluster.test;
 
+import javax.management.MBeanServerConnection;
+
 import junit.framework.Test;
 
 import org.apache.commons.httpclient.HttpClient;
@@ -34,6 +36,7 @@
  * This version tests a SessionBasedClusteredSession.
  * 
  * @author Brian Stansberry
+ * @author <a href="mailto:galder.zamarreno at jboss.com">Galder Zamarreno</a>
  * @version $Id$
  */
 public class UndeployTestCase extends BaseTest
@@ -121,7 +124,7 @@
 
    protected void configureCluster() throws Exception
    {
-      RMIAdaptor[] adaptors = getAdaptors();
+      MBeanServerConnection[] adaptors = getAdaptors();
       String warName = getWarName();
       if (!deployed0_)
       {
@@ -141,7 +144,7 @@
    
    protected void reconfigureCluster() throws Exception
    {
-      RMIAdaptor[] adaptors = getAdaptors();
+      MBeanServerConnection[] adaptors = getAdaptors();
       deploy(adaptors[1], getWarName());
       deployed1_ = true;
       

Modified: branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/jbossmessaging/clustertest/ClusteredTestCase.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/jbossmessaging/clustertest/ClusteredTestCase.java	2008-06-03 22:08:05 UTC (rev 74040)
+++ branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/jbossmessaging/clustertest/ClusteredTestCase.java	2008-06-03 22:10:55 UTC (rev 74041)
@@ -33,6 +33,7 @@
 import javax.jms.Queue;
 import javax.jms.Session;
 import javax.jms.TextMessage;
+import javax.management.MBeanServerConnection;
 import javax.management.ObjectName;
 import javax.naming.Context;
 import javax.naming.InitialContext;
@@ -58,6 +59,7 @@
  * Instead of doing that we run tests in parallel, using this little framework defined by ParallelTestContainer and assert all of them in a single server kill.
  * Also: System.exit(-1); wasn't enough to perform a server crash, as it was causing a regular shutdown, so we are using some reflection to call java.lang.Shutdown#halt.
  * @author <a href="clebert.suconic at jboss.com">Clebert Suconic</a>
+ * @author <a href="mailto:galder.zamarreno at jboss.com">Galder Zamarreno</a>
  *
  */
 public class ClusteredTestCase extends ParallelTestContainer
@@ -84,7 +86,7 @@
         JBossTestClusteredServices testServices = new JBossTestClusteredServices("ClusteredTestCase");
         testServices.init();
         
-        RMIAdaptor rmi = testServices.getAdaptor(1);
+        MBeanServerConnection rmi = testServices.getAdaptor(1);
         
         ObjectName name = new ObjectName("test:name=JBMKillService");
         if (testServices.getServerCount() != 2)

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-06-03 22:08:05 UTC (rev 74040)
+++ branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/testbeancluster/test/RetryInterceptorUnitTestCase.java	2008-06-03 22:10:55 UTC (rev 74041)
@@ -29,6 +29,7 @@
 import java.util.Properties;
 import java.util.Random;
 
+import javax.management.MBeanServerConnection;
 import javax.naming.Context;
 import javax.naming.InitialContext;
 
@@ -54,6 +55,7 @@
  * Tests the RetryInterceptor.
  * 
  * @author <a href="mailto://brian.stansberry@jboss.com">Brian Stansberry</a>
+ * @author <a href="mailto:galder.zamarreno at jboss.com">Galder Zamarreno</a>
  * @version $Revision $
  */
 public class RetryInterceptorUnitTestCase extends JBossClusteredTestCase
@@ -416,7 +418,7 @@
       assertEquals("StatelessSession: Server0 has no calls", 0, slsb.getCallCount());
       
       // Undeploy the ear
-      RMIAdaptor[] adaptors = getAdaptors();
+      MBeanServerConnection[] adaptors = getAdaptors();
       undeploy(adaptors[0], "test-retry.ear");
       setDeployed0(false);
       
@@ -605,7 +607,7 @@
    
    protected void configureCluster() throws Exception
    {
-      RMIAdaptor[] adaptors = getAdaptors();
+      MBeanServerConnection[] adaptors = getAdaptors();
    
       if (!isDeployed0())
    {
@@ -625,7 +627,7 @@
    
    protected void reconfigureCluster() throws Exception
    {
-      RMIAdaptor[] adaptors = getAdaptors();
+      MBeanServerConnection[] adaptors = getAdaptors();
       deploy(adaptors[1], "test-retry.ear");
       setDeployed1(true);
       
@@ -677,7 +679,7 @@
       if (System.getProperty("JBossCluster-DoFail") != null)
          System.setProperty("JBossCluster-DoFail", "false");
       
-      RMIAdaptor[] adaptors = getAdaptors();
+      MBeanServerConnection[] adaptors = getAdaptors();
       if (isDeployed0())
       {
          undeploy(adaptors[0], "test-retry.ear");

Modified: branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/testbeancluster/test/StatefulPassivationExpirationUnitTestCase.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/testbeancluster/test/StatefulPassivationExpirationUnitTestCase.java	2008-06-03 22:08:05 UTC (rev 74040)
+++ branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/testbeancluster/test/StatefulPassivationExpirationUnitTestCase.java	2008-06-03 22:10:55 UTC (rev 74041)
@@ -25,6 +25,7 @@
 import java.util.Date;
 import java.util.Properties;
 
+import javax.management.MBeanServerConnection;
 import javax.management.ObjectName;
 import javax.naming.Context;
 import javax.naming.InitialContext;
@@ -44,6 +45,7 @@
  * @author  <a href="mailto:sacha.labourey at cogito-info.ch">Sacha Labourey</a>.
  * @author Scott.Stark at jboss.org
  * @author Brian Stansberry
+ * @author <a href="mailto:galder.zamarreno at jboss.com">Galder Zamarreno</a>
  * 
  * @version $Revision: 56924 $
  */
@@ -199,7 +201,7 @@
       // Confirm that the bean cache is empty
       String oNameS = "jboss.j2ee:jndiName=ExpiredStatefulSession,plugin=cache,service=EJB";
       ObjectName oName = new ObjectName(oNameS);
-      RMIAdaptor[] adaptors = getAdaptors();      
+      MBeanServerConnection[] adaptors = getAdaptors();      
       Long cacheCount = (Long) adaptors[0].getAttribute(oName, "CacheSize");
       assertEquals("CacheSize is zero", 0, cacheCount.longValue());
       // Checking the passivated count is invalid, as it doesn't get reduced

Modified: branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/web/test/ClusteredSingleSignOnUnitTestCase.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/web/test/ClusteredSingleSignOnUnitTestCase.java	2008-06-03 22:08:05 UTC (rev 74040)
+++ branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/web/test/ClusteredSingleSignOnUnitTestCase.java	2008-06-03 22:10:55 UTC (rev 74041)
@@ -23,6 +23,7 @@
 
 import java.util.Set;
 
+import javax.management.MBeanServerConnection;
 import javax.management.ObjectName;
 
 import junit.framework.Test;
@@ -38,6 +39,7 @@
 /** Tests of web app single sign-on in a clustered environment
  * 
  * @author Brian Stansberry
+ * @author <a href="mailto:galder.zamarreno at jboss.com">Galder Zamarreno</a>
  * @version $Revision$
  */
 public class ClusteredSingleSignOnUnitTestCase 
@@ -48,7 +50,7 @@
    private static boolean deployed0 = true;
    private static boolean deployed1 = true;
    
-   private RMIAdaptor[] adaptors = null;
+   private MBeanServerConnection[] adaptors = null;
    
    public ClusteredSingleSignOnUnitTestCase(String name)
    {
@@ -290,7 +292,7 @@
       assertEquals("node1 cache has no SSOs", 0, ssoIds.size());
    }
    
-   private Set getSSOIds(RMIAdaptor adaptor) throws Exception
+   private Set getSSOIds(MBeanServerConnection adaptor) throws Exception
  {
     Fqn ssoRoot = new Fqn(new Object[] {"SSO"});
     ObjectName oname = new ObjectName("jboss.cache:service=TomcatClusteringCache");




More information about the jboss-cvs-commits mailing list