cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asold...@apache.org
Subject svn commit: r1076052 - in /cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension: ExtensionManagerBus.java ExtensionManagerImpl.java
Date Tue, 01 Mar 2011 23:43:58 GMT
Author: asoldano
Date: Tue Mar  1 23:43:57 2011
New Revision: 1076052

URL: http://svn.apache.org/viewvc?rev=1076052&view=rev
Log:
[CXF-3373] Allow for providing a specific classloader for bus extensions lookup

Modified:
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/ExtensionManagerBus.java
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/ExtensionManagerImpl.java

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/ExtensionManagerBus.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/ExtensionManagerBus.java?rev=1076052&r1=1076051&r2=1076052&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/ExtensionManagerBus.java
(original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/ExtensionManagerBus.java
Tue Mar  1 23:43:57 2011
@@ -58,7 +58,8 @@ public class ExtensionManagerBus extends
     private static final String BUS_ID_PROPERTY_NAME = "org.apache.cxf.bus.id";
     private final ExtensionManagerImpl extensionManager;
     
-    public ExtensionManagerBus(Map<Class, Object> e, Map<String, Object> properties)
{
+    public ExtensionManagerBus(Map<Class, Object> e, Map<String, Object> properties,
+          ClassLoader extensionClassLoader) {
         super(e);
 
         if (null == properties) {
@@ -93,7 +94,7 @@ public class ExtensionManagerBus extends
         extensions.put(ResourceManager.class, resourceManager);
 
         extensionManager = new ExtensionManagerImpl(new String[0],
-                                                    Thread.currentThread().getContextClassLoader(),
+                                                    extensionClassLoader,
                                                     extensions,
                                                     resourceManager, 
                                                     this);
@@ -136,9 +137,13 @@ public class ExtensionManagerBus extends
             lifeCycleManager.initComplete();
         }
     }
+    
+    public ExtensionManagerBus(Map<Class, Object> e, Map<String, Object> properties)
{
+       this(e, properties, Thread.currentThread().getContextClassLoader());
+    }
 
     public ExtensionManagerBus() {
-        this(null, null);
+        this(null, null, Thread.currentThread().getContextClassLoader());
     }
     protected synchronized ConfiguredBeanLocator createConfiguredBeanLocator() {
         ConfiguredBeanLocator loc = (ConfiguredBeanLocator)extensions.get(ConfiguredBeanLocator.class);

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/ExtensionManagerImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/ExtensionManagerImpl.java?rev=1076052&r1=1076051&r2=1076052&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/ExtensionManagerImpl.java
(original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/ExtensionManagerImpl.java
Tue Mar  1 23:43:57 2011
@@ -145,7 +145,7 @@ public class ExtensionManagerImpl implem
     }
     
     final void load(String resource) throws IOException {
-        Enumeration<URL> urls = Thread.currentThread().getContextClassLoader().getResources(resource);
+        Enumeration<URL> urls = loader.getResources(resource);
         List<Extension> all = new LinkedList<Extension>();
         while (urls.hasMoreElements()) {
             URL url = urls.nextElement();



Mime
View raw message