geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmcma...@apache.org
Subject svn commit: r585266 - in /geronimo/server/trunk: modules/geronimo-test-ddbean/src/main/java/org/apache/geronimo/deployment/tools/loader/ plugins/console/console-core/src/main/java/org/apache/geronimo/console/util/
Date Tue, 16 Oct 2007 21:29:15 GMT
Author: pmcmahan
Date: Tue Oct 16 14:29:15 2007
New Revision: 585266

URL: http://svn.apache.org/viewvc?rev=585266&view=rev
Log:
prevent classloader warning messages in the WAR modules portlet (and others) by
using the configuration's classloader to load its interfaces.  also tweak the
technique used for reading the DD from a deployable, retaining the normal
classloader behavior from previous versions of the server for backwards compatibility.


Modified:
    geronimo/server/trunk/modules/geronimo-test-ddbean/src/main/java/org/apache/geronimo/deployment/tools/loader/AbstractDeployable.java
    geronimo/server/trunk/plugins/console/console-core/src/main/java/org/apache/geronimo/console/util/KernelManagementHelper.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=585266&r1=585265&r2=585266&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 14:29:15 2007
@@ -37,6 +37,7 @@
 import javax.enterprise.deploy.shared.ModuleType;
 
 import org.apache.geronimo.deployment.tools.DDBeanRootImpl;
+import org.apache.geronimo.kernel.classloader.UrlResourceFinder;
 import org.apache.geronimo.kernel.config.MultiParentClassLoader;
 
 /**
@@ -54,10 +55,9 @@
     protected AbstractDeployable(ModuleType type, URL moduleURL, String rootDD) throws DDBeanCreateException
{
         this.type = type;
         this.moduleURL = moduleURL;
-        /* 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));
+        rootCL = new URLClassLoader(new URL[] {moduleURL}, Thread.currentThread().getContextClassLoader());
+        UrlResourceFinder resourceFinder = new UrlResourceFinder(new URL[] {moduleURL});
+        root = new DDBeanRootImpl(this, resourceFinder.findResource(rootDD));           
     
 
         // @todo make this work with unpacked
         entries = new ArrayList();

Modified: geronimo/server/trunk/plugins/console/console-core/src/main/java/org/apache/geronimo/console/util/KernelManagementHelper.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-core/src/main/java/org/apache/geronimo/console/util/KernelManagementHelper.java?rev=585266&r1=585265&r2=585266&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-core/src/main/java/org/apache/geronimo/console/util/KernelManagementHelper.java
(original)
+++ geronimo/server/trunk/plugins/console/console-core/src/main/java/org/apache/geronimo/console/util/KernelManagementHelper.java
Tue Oct 16 14:29:15 2007
@@ -539,7 +539,8 @@
             } else {
                 return null;
             }
-            return (J2EEDeployedObject) kernel.getProxyManager().createProxy(result, getClass().getClassLoader());
+            ClassLoader classLoader = kernel.getClassLoaderFor(result);
+            return (J2EEDeployedObject) kernel.getProxyManager().createProxy(result, classLoader);
         } catch (GBeanNotFoundException e) {
             throw new IllegalStateException("Bad config ID: " + e.getMessage(), e);
         }



Mime
View raw message