CXF-5597 Setup the ResourceResolver for BlueprintBus

Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/a40358ae
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/a40358ae
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/a40358ae

Branch: refs/heads/master
Commit: a40358aedb488fdf517955ead872d0f832625ec6
Parents: 82b48aa
Author: Willem Jiang <willem.ji...@gmail.com>
Authored: Thu Mar 6 20:58:36 2014 +0800
Committer: Willem Jiang <willem.ji...@gmail.com>
Committed: Thu Mar 6 21:05:32 2014 +0800

----------------------------------------------------------------------
 .../main/java/org/apache/cxf/bus/blueprint/BlueprintBus.java    | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/a40358ae/core/src/main/java/org/apache/cxf/bus/blueprint/BlueprintBus.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/bus/blueprint/BlueprintBus.java 
b/core/src/main/java/org/apache/cxf/bus/blueprint/BlueprintBus.java
index 5ed1aec..9842ad3 100644
--- a/core/src/main/java/org/apache/cxf/bus/blueprint/BlueprintBus.java
+++ b/core/src/main/java/org/apache/cxf/bus/blueprint/BlueprintBus.java
@@ -25,6 +25,8 @@ import java.security.PrivilegedAction;
 import org.apache.cxf.bus.extension.ExtensionManagerBus;
 import org.apache.cxf.configuration.ConfiguredBeanLocator;
 import org.apache.cxf.configuration.Configurer;
+import org.apache.cxf.resource.ClassLoaderResolver;
+import org.apache.cxf.resource.ResourceManager;
 import org.osgi.framework.BundleContext;
 import org.osgi.service.blueprint.container.BlueprintContainer;
 
@@ -54,6 +56,9 @@ public class BlueprintBus extends ExtensionManagerBus {
                 }
             });
         super.setExtension(bundleClassLoader, ClassLoader.class);
+        // Setup the resource resolver with the bundle classloader
+        ResourceManager rm = super.getExtension(ResourceManager.class);
+        rm.addResourceResolver(new ClassLoaderResolver(bundleClassLoader));
         super.setExtension(c, BundleContext.class);
     }
     public void setBlueprintContainer(BlueprintContainer con) {

Reply via email to