hivemind-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ahue...@apache.org
Subject svn commit: r497983 - in /hivemind/hivemind2/trunk/framework/src/java/org/apache/hivemind/service/impl: ClassFactoryClassLoader.java HiveMindClassPool.java
Date Fri, 19 Jan 2007 22:35:50 GMT
Author: ahuegen
Date: Fri Jan 19 14:35:49 2007
New Revision: 497983

URL: http://svn.apache.org/viewvc?view=rev&rev=497983
Log:
Explicitly include the classloader used to load the HiveMind classes in 
the classloader hierarchy used by ClassFactory (through 
HiveMindClassPool).
Fixes JMX test failures under maven 2.0.4

Modified:
    hivemind/hivemind2/trunk/framework/src/java/org/apache/hivemind/service/impl/ClassFactoryClassLoader.java
    hivemind/hivemind2/trunk/framework/src/java/org/apache/hivemind/service/impl/HiveMindClassPool.java

Modified: hivemind/hivemind2/trunk/framework/src/java/org/apache/hivemind/service/impl/ClassFactoryClassLoader.java
URL: http://svn.apache.org/viewvc/hivemind/hivemind2/trunk/framework/src/java/org/apache/hivemind/service/impl/ClassFactoryClassLoader.java?view=diff&rev=497983&r1=497982&r2=497983
==============================================================================
--- hivemind/hivemind2/trunk/framework/src/java/org/apache/hivemind/service/impl/ClassFactoryClassLoader.java
(original)
+++ hivemind/hivemind2/trunk/framework/src/java/org/apache/hivemind/service/impl/ClassFactoryClassLoader.java
Fri Jan 19 14:35:49 2007
@@ -27,6 +27,11 @@
 {
     private List _loaders = new ArrayList();
 
+    public ClassFactoryClassLoader(ClassLoader parent)
+    {
+        super(parent);
+    }
+
     /**
      * Adds a delegate class loader to the list of delegate class loaders.
      */
@@ -40,17 +45,6 @@
      */
     protected synchronized Class findClass(String name) throws ClassNotFoundException
     {
-        ClassNotFoundException cnfex = null;
-
-        try
-        {
-            return super.findClass(name);
-        }
-        catch (ClassNotFoundException ex)
-        {
-            cnfex = ex;
-        }
-
         int count = _loaders.size();
         for (int i = 0; i < count; i++)
         {
@@ -66,9 +60,5 @@
             }
         }
 
-        // Not found .. through the first exception
-
-        throw cnfex;
-    }
-
-}
\ No newline at end of file
+        throw new ClassNotFoundException(name);
+    }}
\ No newline at end of file

Modified: hivemind/hivemind2/trunk/framework/src/java/org/apache/hivemind/service/impl/HiveMindClassPool.java
URL: http://svn.apache.org/viewvc/hivemind/hivemind2/trunk/framework/src/java/org/apache/hivemind/service/impl/HiveMindClassPool.java?view=diff&rev=497983&r1=497982&r2=497983
==============================================================================
--- hivemind/hivemind2/trunk/framework/src/java/org/apache/hivemind/service/impl/HiveMindClassPool.java
(original)
+++ hivemind/hivemind2/trunk/framework/src/java/org/apache/hivemind/service/impl/HiveMindClassPool.java
Fri Jan 19 14:35:49 2007
@@ -32,8 +32,8 @@
  */
 public class HiveMindClassPool extends ClassPool
 {
-    private ClassFactoryClassLoader _loader = new ClassFactoryClassLoader();
-
+    private ClassFactoryClassLoader _loader = new ClassFactoryClassLoader(HiveMindClassPool.class.getClassLoader());
+    
     /**
      * Used to identify which class loaders have already been integrated into the pool.
      */



Mime
View raw message