User: d_jencks
  Date: 02/01/29 13:59:58

  Modified:    src/main/org/jboss/test JBossTestCase.java
                        JBossTestServices.java JBossTestSetup.java
  Log:
  simplified deployment calls
  
  Revision  Changes    Path
  1.10      +16 -53    jbosstest/src/main/org/jboss/test/JBossTestCase.java
  
  Index: JBossTestCase.java
  ===================================================================
  RCS file: /cvsroot/jboss/jbosstest/src/main/org/jboss/test/JBossTestCase.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- JBossTestCase.java        2001/12/12 20:08:24     1.9
  +++ JBossTestCase.java        2002/01/29 21:59:58     1.10
  @@ -42,7 +42,7 @@
    * ../lib).
    *
    * @author    <a href="mailto:[EMAIL PROTECTED]";>David Jencks</a>
  - * @version   $Revision: 1.9 $
  + * @version   $Revision: 1.10 $
    */
   public class JBossTestCase
          extends TestCase
  @@ -142,28 +142,17 @@
      }
   
      /**
  -    * Gets the ServiceDeployerName attribute of the JBossTestCase object
  +    * Gets the DeployerName attribute of the JBossTestCase object
       *
  -    * @return                                  The ServiceDeployerName value
  +    * @return                                  The DeployerName value
       * @exception MalformedObjectNameException  Description of Exception
       */
  -   protected ObjectName getServiceDeployerName() throws MalformedObjectNameException
  +   protected ObjectName getDeployerName() throws MalformedObjectNameException
      {
  -      return delegate.getServiceDeployerName();
  +      return delegate.getDeployerName();
      }
   
  -   /**
  -    * Gets the J2eeDeployerName attribute of the JBossTestCase object
  -    *
  -    * @return                                  The J2eeDeployerName value
  -    * @exception MalformedObjectNameException  Description of Exception
  -    */
  -   protected ObjectName getJ2eeDeployerName() throws MalformedObjectNameException
  -   {
  -      return delegate.getJ2eeDeployerName();
  -   }
   
  -
      /**
       * Returns the deployment directory to use. This does it's best to figure out
       * where you are looking. If you supply a complete url, it returns it.
  @@ -210,56 +199,30 @@
      }
   
      /**
  -    * Deploy a j2ee package with the J2E deployer. The supplied name is
  +    * Deploy a package with the main deployer. The supplied name is
       * interpreted as a url, or as a filename in jbosstest.deploy.lib or ../lib.
       *
       * @param name           filename/url of package to deploy.
       * @exception Exception  Description of Exception
       */
  -   protected void deployJ2ee(String name) throws Exception
  +   protected void deploy(String name) throws Exception
      {
  -      delegate.deployJ2ee(name);
  +      delegate.deploy(name);
      }
   
      /**
  -    * Undeploy a j2ee package with the J2E deployer. The supplied name is
  +    * Undeploy a package with the main deployer. The supplied name is
       * interpreted as a url, or as a filename in jbosstest.deploy.lib or ../lib.
       *
       * @param name           filename/url of package to undeploy.
       * @exception Exception  Description of Exception
  -    */
  -   protected void undeployJ2ee(String name) throws Exception
  -   {
  -      delegate.undeployJ2ee(name);
  -   }
  -
  -   /**
  -    * Deploy a jboss service package with the service deployer. The supplied
  -    * name is interpreted as a url, or as a filename in jbosstest.deploy.lib or
  -    * ../lib.
  -    *
  -    * @param name           filename/url of package to deploy.
  -    * @exception Exception  Description of Exception
  -    */
  -   protected void deployService(String name) throws Exception
  -   {
  -      delegate.deployService(name);
  -   }
  -
  -   /**
  -    * Undeploy a jboss service package with the service deployer. The supplied
  -    * name is interpreted as a url, or as a filename in jbosstest.deploy.lib or
  -    * ../lib.
  -    *
  -    * @param name           filename/url of package to undeploy.
  -    * @exception Exception  Description of Exception
       */
  -   protected void undeployService(String name) throws Exception
  +   protected void undeploy(String name) throws Exception
      {
  -      delegate.undeployService(name);
  +      delegate.undeploy(name);
      }
   
  -   public static Test getJ2eeSetup(final Test test, final String jarName) throws 
Exception
  +   public static Test getDeploySetup(final Test test, final String jarName) throws 
Exception
      {
         JBossTestSetup wrapper = new JBossTestSetup(test)
            {
  @@ -268,7 +231,7 @@
                {
                   deploymentException = null;
                   try {
  -                   this.deployJ2ee(jarName);
  +                   this.deploy(jarName);
                      this.getLog().debug("deployed package: " + jarName);
                   } catch (Exception ex) {
                      // Throw this in testServerFound() instead.
  @@ -278,18 +241,18 @@
   
                protected void tearDown() throws Exception
                {
  -                this.undeployJ2ee(jarName);
  +                this.undeploy(jarName);
                   this.getLog().debug("undeployed package: " + jarName);
                }
             };
         return wrapper;
      }
   
  -   public static Test getJ2eeSetup(final Class clazz, final String jarName) throws 
Exception
  +   public static Test getDeploySetup(final Class clazz, final String jarName) 
throws Exception
      {
         TestSuite suite = new TestSuite();  
         suite.addTest(new TestSuite(clazz));
  -      return getJ2eeSetup(suite, jarName);
  +      return getDeploySetup(suite, jarName);
      }
   
      protected int getThreadCount()
  
  
  
  1.10      +16 -64    jbosstest/src/main/org/jboss/test/JBossTestServices.java
  
  Index: JBossTestServices.java
  ===================================================================
  RCS file: /cvsroot/jboss/jbosstest/src/main/org/jboss/test/JBossTestServices.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- JBossTestServices.java    2002/01/03 04:01:01     1.9
  +++ JBossTestServices.java    2002/01/29 21:59:58     1.10
  @@ -46,15 +46,17 @@
    *
    * @author    <a href="mailto:[EMAIL PROTECTED]";>David Jencks</a>
    * @author    <a href="mailto:[EMAIL PROTECTED]";>Christoph G. Jung</a>
  - * @version   $Revision: 1.9 $
  + * @version   $Revision: 1.10 $
    */
   public class JBossTestServices
   {
      
      // Constants -----------------------------------------------------
  -   private final static String serviceDeployerName = 
"jboss.system:service=ServiceDeployer";
  -   private final static String j2eeDeployerName = "jboss.j2ee:service=J2eeDeployer";
  +   //private final static String serviceDeployerName = 
"jboss.system:service=ServiceDeployer";
  +   //private final static String j2eeDeployerName = 
"jboss.j2ee:service=J2eeDeployer";
      
  +   private final static String DEPLOYER_NAME = "jboss.system:service=MainDeployer";
  +
      private final static int DEFAULT_THREADCOUNT = 10;
      private final static int DEFAULT_ITERATIONCOUNT = 1000;
      private final static int DEFAULT_BEANCOUNT = 100;
  @@ -140,27 +142,16 @@
      }
      
      /**
  -    * Gets the ServiceDeployerName attribute of the JBossTestCase object
  +    * Gets the Main Deployer Name attribute of the JBossTestCase object
       *
  -    * @return                                  The ServiceDeployerName value
  +    * @return                                  The Main DeployerName value
       * @exception MalformedObjectNameException  Description of Exception
       */
  -   ObjectName getServiceDeployerName() throws MalformedObjectNameException
  +   ObjectName getDeployerName() throws MalformedObjectNameException
      {
  -      return new ObjectName(serviceDeployerName);
  +      return new ObjectName(DEPLOYER_NAME);
      }
      
  -   /**
  -    * Gets the J2eeDeployerName attribute of the JBossTestCase object
  -    *
  -    * @return                                  The J2eeDeployerName value
  -    * @exception MalformedObjectNameException  Description of Exception
  -    */
  -   ObjectName getJ2eeDeployerName() throws MalformedObjectNameException
  -   {
  -      return new ObjectName(j2eeDeployerName);
  -   }
  -   
      
      /**
       * Returns the deployment directory to use. This does it's best to figure out
  @@ -258,17 +249,18 @@
         }
      }
      
  +
      /**
  -    * Deploy a j2ee package with the J2E deployer. The supplied name is
  +    * Deploy a package with the main deployer. The supplied name is
       * interpreted as a url, or as a filename in jbosstest.deploy.lib or ../lib.
       *
       * @param name           filename/url of package to deploy.
       * @exception Exception  Description of Exception
       */
  -   public void deployJ2ee(String name) throws Exception
  +   public void deploy(String name) throws Exception
      {
         String deployName = getDeployURL(name);
  -      invoke(getJ2eeDeployerName(),
  +      invoke(getDeployerName(),
         "deploy",
         new Object[]
         {deployName},
  @@ -276,18 +268,17 @@
         {"java.lang.String"});
         setDeployed(deployName);
      }
  -   
      /**
  -    * Undeploy a j2ee package with the J2E deployer. The supplied name is
  +    * Undeploy a package with the main deployer. The supplied name is
       * interpreted as a url, or as a filename in jbosstest.deploy.lib or ../lib.
       *
       * @param name           filename/url of package to undeploy.
       * @exception Exception  Description of Exception
       */
  -   public void undeployJ2ee(String name) throws Exception
  +   public void undeploy(String name) throws Exception
      {
         String deployName = getDeployURL(name);
  -      invoke(getJ2eeDeployerName(),
  +      invoke(getDeployerName(),
         "undeploy",
         new Object[]
         {deployName},
  @@ -296,45 +287,6 @@
         setUnDeployed(deployName);
      }
      
  -   /**
  -    * Deploy a jboss service package with the service deployer. The supplied
  -    * name is interpreted as a url, or as a filename in jbosstest.deploy.lib or
  -    * ../lib.
  -    *
  -    * @param name           filename/url of package to deploy.
  -    * @exception Exception  Description of Exception
  -    */
  -   void deployService(String name) throws Exception
  -   {
  -      String deployName = getDeployURL(name);
  -      invoke(getServiceDeployerName(),
  -      "deploy",
  -      new Object[]
  -      {deployName},
  -      new String[]
  -      {"java.lang.String"});
  -      setDeployed(deployName);
  -   }
  -   
  -   /**
  -    * Undeploy a jboss service package with the service deployer. The supplied
  -    * name is interpreted as a url, or as a filename in jbosstest.deploy.lib or
  -    * ../lib.
  -    *
  -    * @param name           filename/url of package to undeploy.
  -    * @exception Exception  Description of Exception
  -    */
  -   void undeployService(String name) throws Exception
  -   {
  -      String deployName = getDeployURL(name);
  -      invoke(getServiceDeployerName(),
  -      "undeploy",
  -      new Object[]
  -      {deployName},
  -      new String[]
  -      {"java.lang.String"});
  -      setUnDeployed(deployName);
  -   }
      
      
      void flushAuthCache() throws Exception
  
  
  
  1.8       +12 -49    jbosstest/src/main/org/jboss/test/JBossTestSetup.java
  
  Index: JBossTestSetup.java
  ===================================================================
  RCS file: /cvsroot/jboss/jbosstest/src/main/org/jboss/test/JBossTestSetup.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- JBossTestSetup.java       2001/10/17 19:35:58     1.7
  +++ JBossTestSetup.java       2002/01/29 21:59:58     1.8
  @@ -49,7 +49,7 @@
    *
    * @author    <a href="mailto:[EMAIL PROTECTED]";>David Jencks</a>
    * @author    <a href="mailto:[EMAIL PROTECTED]";>Christoph G. Jung</a>
  - * @version   $Revision: 1.7 $
  + * @version   $Revision: 1.8 $
    */
   public class JBossTestSetup
   extends TestSetup
  @@ -136,28 +136,16 @@
      }
      
      /**
  -    * Gets the ServiceDeployerName attribute of the JBossTestCase object
  +    * Gets the DeployerName attribute of the JBossTestCase object
       *
  -    * @return                                  The ServiceDeployerName value
  +    * @return                                  The DeployerName value
       * @exception MalformedObjectNameException  Description of Exception
       */
  -   protected ObjectName getServiceDeployerName() throws MalformedObjectNameException
  +   protected ObjectName getDeployerName() throws MalformedObjectNameException
      {
  -      return delegate.getServiceDeployerName();
  +      return delegate.getDeployerName();
      }
  -   
  -   /**
  -    * Gets the J2eeDeployerName attribute of the JBossTestCase object
  -    *
  -    * @return                                  The J2eeDeployerName value
  -    * @exception MalformedObjectNameException  Description of Exception
  -    */
  -   protected ObjectName getJ2eeDeployerName() throws MalformedObjectNameException
  -   {
  -      return delegate.getJ2eeDeployerName();
  -   }
  -   
  -   
  +
      /**
       * Returns the deployment directory to use. This does it's best to figure out
       * where you are looking. If you supply a complete url, it returns it.
  @@ -204,54 +192,29 @@
      }
      
      /**
  -    * Deploy a j2ee package with the J2E deployer. The supplied name is
  +    * Deploy a package with the main deployer. The supplied name is
       * interpreted as a url, or as a filename in jbosstest.deploy.lib or ../lib.
       *
       * @param name           filename/url of package to deploy.
       * @exception Exception  Description of Exception
       */
  -   protected void deployJ2ee(String name) throws Exception
  +   protected void deploy(String name) throws Exception
      {
  -      delegate.deployJ2ee(name);
  +      delegate.deploy(name);
      }
      
      /**
  -    * Undeploy a j2ee package with the J2E deployer. The supplied name is
  +    * Undeploy a package with the main deployer. The supplied name is
       * interpreted as a url, or as a filename in jbosstest.deploy.lib or ../lib.
       *
       * @param name           filename/url of package to undeploy.
       * @exception Exception  Description of Exception
  -    */
  -   protected void undeployJ2ee(String name) throws Exception
  -   {
  -      delegate.undeployJ2ee(name);
  -   }
  -   
  -   /**
  -    * Deploy a jboss service package with the service deployer. The supplied
  -    * name is interpreted as a url, or as a filename in jbosstest.deploy.lib or
  -    * ../lib.
  -    *
  -    * @param name           filename/url of package to deploy.
  -    * @exception Exception  Description of Exception
       */
  -   protected void deployService(String name) throws Exception
  +   protected void undeploy(String name) throws Exception
      {
  -      delegate.deployService(name);
  +      delegate.undeploy(name);
      }
      
  -   /**
  -    * Undeploy a jboss service package with the service deployer. The supplied
  -    * name is interpreted as a url, or as a filename in jbosstest.deploy.lib or
  -    * ../lib.
  -    *
  -    * @param name           filename/url of package to undeploy.
  -    * @exception Exception  Description of Exception
  -    */
  -   protected void undeployService(String name) throws Exception
  -   {
  -      delegate.undeployService(name);
  -   }
      
      
      protected void flushAuthCache() throws Exception
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to