[jboss-cvs] JBossAS SVN: r60273 - 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
Sun Feb 4 15:09:24 EST 2007


Author: bstansberry at jboss.com
Date: 2007-02-04 15:09:24 -0500 (Sun, 04 Feb 2007)
New Revision: 60273

Modified:
   branches/Branch_4_2/testsuite/src/main/org/jboss/test/classloader/leak/clstore/ClassLoaderStore.java
Log:
Handle JVMTI initialization failure

Modified: branches/Branch_4_2/testsuite/src/main/org/jboss/test/classloader/leak/clstore/ClassLoaderStore.java
===================================================================
--- branches/Branch_4_2/testsuite/src/main/org/jboss/test/classloader/leak/clstore/ClassLoaderStore.java	2007-02-04 20:02:56 UTC (rev 60272)
+++ branches/Branch_4_2/testsuite/src/main/org/jboss/test/classloader/leak/clstore/ClassLoaderStore.java	2007-02-04 20:09:24 UTC (rev 60273)
@@ -96,9 +96,18 @@
     */
    private ClassLoader getClassLoader(WeakReference weakReferenceOnLoader, String reportHTMLFile) throws Exception
    {
-      JVMTIInterface jvmti = new JVMTIInterface();
-      if (jvmti.isActive())
+      JVMTIInterface jvmti = null;
+      try
       {
+         jvmti = new JVMTIInterface();
+      }
+      catch (Throwable t)
+      {
+         log.debug("Could not instantiate JVMTIInterface:" + t.getLocalizedMessage());
+      }
+      
+      if (jvmti != null && jvmti.isActive())
+      {
          jvmti.forceGC();
          
          if (weakReferenceOnLoader.get() == null)




More information about the jboss-cvs-commits mailing list