hivemind-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From k...@apache.org
Subject svn commit: r426434 - in /hivemind/branches/branch-1-1/framework/src/java/org/apache/hivemind/service/impl: ClassFactoryClassLoader.java HiveMindClassPool.java
Date Fri, 28 Jul 2006 08:34:25 GMT
Author: knut
Date: Fri Jul 28 01:34:25 2006
New Revision: 426434

URL: http://svn.apache.org/viewvc?rev=426434&view=rev
Log:
Explicitly include the classloader used to load the HiveMind classes in the classloader hierarchy
used by ClassFactory (through HiveMindClassPool)

Modified:
    hivemind/branches/branch-1-1/framework/src/java/org/apache/hivemind/service/impl/ClassFactoryClassLoader.java
    hivemind/branches/branch-1-1/framework/src/java/org/apache/hivemind/service/impl/HiveMindClassPool.java

Modified: hivemind/branches/branch-1-1/framework/src/java/org/apache/hivemind/service/impl/ClassFactoryClassLoader.java
URL: http://svn.apache.org/viewvc/hivemind/branches/branch-1-1/framework/src/java/org/apache/hivemind/service/impl/ClassFactoryClassLoader.java?rev=426434&r1=426433&r2=426434&view=diff
==============================================================================
--- hivemind/branches/branch-1-1/framework/src/java/org/apache/hivemind/service/impl/ClassFactoryClassLoader.java
(original)
+++ hivemind/branches/branch-1-1/framework/src/java/org/apache/hivemind/service/impl/ClassFactoryClassLoader.java
Fri Jul 28 01:34:25 2006
@@ -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,7 @@
             }
         }
 
-        // Not found .. through the first exception
-
-        throw cnfex;
+        throw new ClassNotFoundException(name);
     }
 
 }

Modified: hivemind/branches/branch-1-1/framework/src/java/org/apache/hivemind/service/impl/HiveMindClassPool.java
URL: http://svn.apache.org/viewvc/hivemind/branches/branch-1-1/framework/src/java/org/apache/hivemind/service/impl/HiveMindClassPool.java?rev=426434&r1=426433&r2=426434&view=diff
==============================================================================
--- hivemind/branches/branch-1-1/framework/src/java/org/apache/hivemind/service/impl/HiveMindClassPool.java
(original)
+++ hivemind/branches/branch-1-1/framework/src/java/org/apache/hivemind/service/impl/HiveMindClassPool.java
Fri Jul 28 01:34:25 2006
@@ -32,7 +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