You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by ga...@apache.org on 2007/10/16 18:40:41 UTC

svn commit: r585193 - /geronimo/server/trunk/modules/geronimo-test-ddbean/src/main/java/org/apache/geronimo/deployment/tools/loader/AbstractDeployable.java

Author: gawor
Date: Tue Oct 16 09:40:34 2007
New Revision: 585193

URL: http://svn.apache.org/viewvc?rev=585193&view=rev
Log:
look for resources in the current classloader first and parent second. should fix the last failing console test where wrong ra.xml was loaded

Modified:
    geronimo/server/trunk/modules/geronimo-test-ddbean/src/main/java/org/apache/geronimo/deployment/tools/loader/AbstractDeployable.java

Modified: geronimo/server/trunk/modules/geronimo-test-ddbean/src/main/java/org/apache/geronimo/deployment/tools/loader/AbstractDeployable.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-test-ddbean/src/main/java/org/apache/geronimo/deployment/tools/loader/AbstractDeployable.java?rev=585193&r1=585192&r2=585193&view=diff
==============================================================================
--- geronimo/server/trunk/modules/geronimo-test-ddbean/src/main/java/org/apache/geronimo/deployment/tools/loader/AbstractDeployable.java (original)
+++ geronimo/server/trunk/modules/geronimo-test-ddbean/src/main/java/org/apache/geronimo/deployment/tools/loader/AbstractDeployable.java Tue Oct 16 09:40:34 2007
@@ -37,6 +37,7 @@
 import javax.enterprise.deploy.shared.ModuleType;
 
 import org.apache.geronimo.deployment.tools.DDBeanRootImpl;
+import org.apache.geronimo.kernel.config.MultiParentClassLoader;
 
 /**
  * 
@@ -53,7 +54,9 @@
     protected AbstractDeployable(ModuleType type, URL moduleURL, String rootDD) throws DDBeanCreateException {
         this.type = type;
         this.moduleURL = moduleURL;
-        rootCL = new URLClassLoader(new URL[] {moduleURL}, Thread.currentThread().getContextClassLoader());
+        /* Setup classloader with inverse class loading so that resources are first checked in the 
+         * current classloader instead of the parent classloader. */                  
+        rootCL = new MultiParentClassLoader(null, new URL[] {moduleURL}, Thread.currentThread().getContextClassLoader(), true, new String [] {}, new String [] {});
         root = new DDBeanRootImpl(this, rootCL.getResource(rootDD));
 
         // @todo make this work with unpacked