[JBoss-dev] CVS update: jbosstest/src/main/org/jboss/test/util Deploy.java

2001-09-17 Thread David Jencks

  User: d_jencks
  Date: 01/09/17 10:33:54

  Removed: src/main/org/jboss/test/util Deploy.java
  Log:
  Finished converting to JBossTestCase for deploy and logging.  Security tests still 
do not work due to deploy problems

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



[JBoss-dev] CVS update: jbosstest/src/main/org/jboss/test/util Deploy.java

2001-09-12 Thread Mad

  User: schaefera
  Date: 01/09/12 13:43:01

  Modified:src/main/org/jboss/test/util Deploy.java
  Log:
  Fixed some problems with the deployer.
  
  Revision  ChangesPath
  1.7   +4 -3  jbosstest/src/main/org/jboss/test/util/Deploy.java
  
  Index: Deploy.java
  ===
  RCS file: /cvsroot/jboss/jbosstest/src/main/org/jboss/test/util/Deploy.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Deploy.java   2001/07/15 00:36:21 1.6
  +++ Deploy.java   2001/09/12 20:43:01 1.7
  @@ -7,6 +7,7 @@
   
   package org.jboss.test.util;
   
  +import java.net.InetAddress;
   import java.util.Map;
   import java.util.Hashtable;
   import javax.management.MBeanException;
  @@ -18,7 +19,7 @@
*
* @author  [EMAIL PROTECTED]
* @author  a href=mailto:[EMAIL PROTECTED];Jason Dillon/a
  - * @version $Revision: 1.6 $
  + * @version $Revision: 1.7 $
*/
   public class Deploy
   {
  @@ -70,7 +71,7 @@
 System.out.print(Deploying: + jarName + ...);
 try
 {
  - new org.jboss.jmx.client.Deployer().deploy(filename);
  + new org.jboss.jmx.service.Deployer( 
InetAddress.getLocalHost().getHostName() ).deploy(filename);
 }
 catch(MBeanException e)
 {
  @@ -95,7 +96,7 @@
 System.out.print(Undeploying: + jarName + ...);
 try
 {
  - new org.jboss.jmx.client.Deployer().undeploy(filename);
  + new org.jboss.jmx.service.Deployer( 
InetAddress.getLocalHost().getHostName() ).undeploy(filename);
 }
 catch(MBeanException e)
 {
  
  
  

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



[JBoss-dev] CVS update: jbosstest/src/main/org/jboss/test/util Deploy.java

2001-07-09 Thread Jason Dillon

  User: user57  
  Date: 01/07/09 19:34:05

  Modified:src/main/org/jboss/test/util Deploy.java
  Log:
   o changed all deploy tests to deploy as a test and to not call System.exit().
 this should allow reports to be generated for tests that fail to deploy.
   o modified run_tests.xml basic-security-tests to not-halt on error, so that
 test-and-report will produce reports even if the security tests fail.
  
  Revision  ChangesPath
  1.5   +108 -96   jbosstest/src/main/org/jboss/test/util/Deploy.java
  
  Index: Deploy.java
  ===
  RCS file: /cvsroot/jboss/jbosstest/src/main/org/jboss/test/util/Deploy.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Deploy.java   2001/07/06 02:29:21 1.4
  +++ Deploy.java   2001/07/10 02:34:05 1.5
  @@ -17,107 +17,119 @@
*
* @author  [EMAIL PROTECTED]
* @author  a href=mailto:[EMAIL PROTECTED];Jason Dillon/a
  - * @version $Revision: 1.4 $
  + * @version $Revision: 1.5 $
*/
   public class Deploy
   {
  -/** A map of jarname - Boolean deployment status. */
  -private static Map deployed = new Hashtable();
  +   /** A map of jarname - Boolean deployment status. */
  +   private static Map deployed = new Hashtable();
   
  -/**
  - * Check if a jar is deployed.
  - */
  -private static boolean isDeployed(final String jarName) {
  -Boolean bool = (Boolean)deployed.get(jarName);
  -if (bool == null)
  -return false;
  -return bool.booleanValue();
  -}
  -
  -/**
  - * Mark a jar as deployed or undeployed.
  - */
  -private static void setDeployed(final String jarName, final boolean flag)
  -{
  -deployed.put(jarName, new Boolean(flag));
  -}
  -
  -/** Return the deployment directory to use. */
  -private static String getDeployFilename(final String filename) {
  -String deployDir = System.getProperty(jbosstest.deploy.dir);
  -if (deployDir == null) {
  -deployDir = ../deploy;
  -}
  -return deployDir + / + filename;
  -}
  +   /**
  +* Check if a jar is deployed.
  +*/
  +   private static boolean isDeployed(final String jarName) {
  +  Boolean bool = (Boolean)deployed.get(jarName);
  +  if (bool == null)
  + return false;
  +  return bool.booleanValue();
  +   }
  +
  +   /**
  +* Mark a jar as deployed or undeployed.
  +*/
  +   private static void setDeployed(final String jarName, final boolean flag)
  +   {
  +  deployed.put(jarName, new Boolean(flag));
  +   }
  +
  +   /** Return the deployment directory to use. */
  +   private static String getDeployFilename(final String filename) {
  +  String deployDir = System.getProperty(jbosstest.deploy.dir);
  +  if (deployDir == null) {
  + deployDir = ../deploy;
  +  }
  +  return deployDir + / + filename;
  +   }
   
  -/**
  - * Deploy the security ejb jar one time.
  - */
  -public static void deploy(final String jarName) throws Exception
  -{
  -String noDeploy = System.getProperty(no-deploy);
  -if (noDeploy != null || isDeployed(jarName)) {
  -return;
  -}
  -
  -String filename = getDeployFilename(jarName);
  -System.out.print(Deploying: + jarName + ...);
  -new org.jboss.jmx.client.Deployer().deploy(filename);
  -setDeployed(jarName, true);
  -System.out.println(Done);
  -}
  -
  -/**
  - * Undeploy an archive from a the remote JBoss server.
  - */
  -public static void undeploy(final String jarName) throws Exception
  -{
  -String noUndeploy = System.getProperty(no-undeploy);
  -if (noUndeploy != null || !isDeployed(jarName)) {
  -return;
  -}
  -
  -String filename = getDeployFilename(jarName);
  -System.out.print(Undeploying: + jarName + ...);
  -new org.jboss.jmx.client.Deployer().undeploy(filename);
  -setDeployed(jarName, false);
  -System.out.println(Done);
  -}
  -
  -/**
  - * A psuedo test case, which provides hooks to deploy.
  - */
  -public static class Deployer
  -extends TestCase
  -{
  -String jarName;
  -
  -public Deployer(final String jarName) {
  -super(deploy);
  -this.jarName = jarName;
  -}
  -
  -public void deploy() throws Exception {
  -Deploy.deploy(this.jarName);
  -}
  -}
  +   /**
  +* Deploy the security ejb jar one time.
  +*/
  +   public static void deploy(final String jarName) throws Exception
  +   {
  +  String noDeploy = System.getProperty(no-deploy);
  +  if (noDeploy != null || isDeployed(jarName)) {
  + return;
  +  }
  +
  +  String filename = 

[JBoss-dev] CVS update: jbosstest/src/main/org/jboss/test/util Deploy.java

2001-07-05 Thread Jason Dillon

  User: user57  
  Date: 01/07/05 19:29:21

  Modified:src/main/org/jboss/test/util Deploy.java
  Log:
   o Changed all tests which deploy one or more jars to undeploy after
 testing.
  
  Revision  ChangesPath
  1.4   +47 -27jbosstest/src/main/org/jboss/test/util/Deploy.java
  
  Index: Deploy.java
  ===
  RCS file: /cvsroot/jboss/jbosstest/src/main/org/jboss/test/util/Deploy.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Deploy.java   2001/07/04 10:26:08 1.3
  +++ Deploy.java   2001/07/06 02:29:21 1.4
  @@ -7,62 +7,82 @@
   
   package org.jboss.test.util;
   
  +import java.util.Map;
  +import java.util.Hashtable;
  +
   import junit.framework.TestCase;
   
   /**
  - * A utility class for deploying the a named ejb jar.
  + * A utility class for deploying jar files.
*
* @author  [EMAIL PROTECTED]
* @author  a href=mailto:[EMAIL PROTECTED];Jason Dillon/a
  - * @version $Revision: 1.3 $
  + * @version $Revision: 1.4 $
*/
   public class Deploy
   {
  -//
  -// Is each CL expected to only manage one deployed application archive?
  -//
  -public static boolean deployed;
  +/** A map of jarname - Boolean deployment status. */
  +private static Map deployed = new Hashtable();
   
   /**
  - * Deploy the security ejb jar one time.
  + * Check if a jar is deployed.
  + */
  +private static boolean isDeployed(final String jarName) {
  +Boolean bool = (Boolean)deployed.get(jarName);
  +if (bool == null)
  +return false;
  +return bool.booleanValue();
  +}
  +
  +/**
  + * Mark a jar as deployed or undeployed.
*/
  -public static void deploy(String jarName) throws Exception
  +private static void setDeployed(final String jarName, final boolean flag)
   {
  -String noDeploy = System.getProperty(no-deploy);
  -if (noDeploy != null || deployed) {
  -return;
  -}
  +deployed.put(jarName, new Boolean(flag));
  +}
   
  +/** Return the deployment directory to use. */
  +private static String getDeployFilename(final String filename) {
   String deployDir = System.getProperty(jbosstest.deploy.dir);
   if (deployDir == null) {
   deployDir = ../deploy;
   }
  +return deployDir + / + filename;
  +}
  +
  +/**
  + * Deploy the security ejb jar one time.
  + */
  +public static void deploy(final String jarName) throws Exception
  +{
  +String noDeploy = System.getProperty(no-deploy);
  +if (noDeploy != null || isDeployed(jarName)) {
  +return;
  +}
   
  -System.out.println(Deploying: + jarName);
  -new org.jboss.jmx.client.Deployer().deploy(deployDir+'/' + jarName);
  -deployed = true;
  -System.out.println(Deployed: + jarName);
  +String filename = getDeployFilename(jarName);
  +System.out.print(Deploying: + jarName + ...);
  +new org.jboss.jmx.client.Deployer().deploy(filename);
  +setDeployed(jarName, true);
  +System.out.println(Done);
   }
   
   /**
* Undeploy an archive from a the remote JBoss server.
*/
  -public static void undeploy(String jarName) throws Exception
  +public static void undeploy(final String jarName) throws Exception
   {
   String noUndeploy = System.getProperty(no-undeploy);
  -if (noUndeploy != null || !deployed) {
  +if (noUndeploy != null || !isDeployed(jarName)) {
   return;
   }
  -
  -String deployDir = System.getProperty(jbosstest.deploy.dir);
  -if (deployDir == null) {
  -deployDir = ../deploy;
  -}
   
  -System.out.println(Undeploying: + jarName);
  -new org.jboss.jmx.client.Deployer().undeploy(deployDir+'/' + jarName);
  -deployed = false;
  -System.out.println(Undeployed: + jarName);
  +String filename = getDeployFilename(jarName);
  +System.out.print(Undeploying: + jarName + ...);
  +new org.jboss.jmx.client.Deployer().undeploy(filename);
  +setDeployed(jarName, false);
  +System.out.println(Done);
   }
   
   /**
  
  
  

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