[jboss-cvs] JBossAS SVN: r61362 - branches/Branch_4_2/testsuite/src/main/org/jboss/test/classloader/leak/clstore.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Mar 15 23:42:48 EDT 2007


Author: bstansberry at jboss.com
Date: 2007-03-15 23:42:48 -0400 (Thu, 15 Mar 2007)
New Revision: 61362

Modified:
   branches/Branch_4_2/testsuite/src/main/org/jboss/test/classloader/leak/clstore/LeakAnalyzer.java
Log:
Support redeployment when jbossAgent is used

Modified: branches/Branch_4_2/testsuite/src/main/org/jboss/test/classloader/leak/clstore/LeakAnalyzer.java
===================================================================
--- branches/Branch_4_2/testsuite/src/main/org/jboss/test/classloader/leak/clstore/LeakAnalyzer.java	2007-03-16 03:40:33 UTC (rev 61361)
+++ branches/Branch_4_2/testsuite/src/main/org/jboss/test/classloader/leak/clstore/LeakAnalyzer.java	2007-03-16 03:42:48 UTC (rev 61362)
@@ -60,6 +60,23 @@
       super();
    }
 
+   public boolean isActive()
+   {
+      // System.loadLibrary fails if it is called twice, which it will
+      // be if this class is redeployed. So, the first time we get a positive
+      // result, store it in a system property, and thereafter return
+      // the system property
+      String existing = System.getProperty("jboss.test.jbossAgent.avail");
+      if (existing != null)
+         return Boolean.parseBoolean(existing);
+      
+      boolean active = super.isActive();
+      System.setProperty("jboss.test.jbossAgent.avail", Boolean.toString(active));
+      return active;
+   }
+
+
+
    /**
     * Show the reference holders tree of an object. This returns a report you
     * can visualize through MBean.




More information about the jboss-cvs-commits mailing list