cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r1138913 - in /cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus: blueprint/BlueprintBus.java osgi/OSGiExtensionLocator.java
Date Thu, 23 Jun 2011 15:02:13 GMT
Author: ningjiang
Date: Thu Jun 23 15:02:13 2011
New Revision: 1138913

URL: http://svn.apache.org/viewvc?rev=1138913&view=rev
Log:
CXF-3615 set the classloader when creating the BlueprintBus

Modified:
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/blueprint/BlueprintBus.java
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/osgi/OSGiExtensionLocator.java

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/blueprint/BlueprintBus.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/blueprint/BlueprintBus.java?rev=1138913&r1=1138912&r2=1138913&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/blueprint/BlueprintBus.java (original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/blueprint/BlueprintBus.java Thu Jun
23 15:02:13 2011
@@ -36,6 +36,8 @@ public class BlueprintBus extends Extens
     BlueprintContainer container;
     
     public BlueprintBus() {
+        // Using the BlueprintBus Classloader to load the extensions
+        super(null, null, BlueprintBus.class.getClassLoader());
     }
     
     public void setBundleContext(BundleContext c) {

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/osgi/OSGiExtensionLocator.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/osgi/OSGiExtensionLocator.java?rev=1138913&r1=1138912&r2=1138913&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/osgi/OSGiExtensionLocator.java (original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/osgi/OSGiExtensionLocator.java Thu
Jun 23 15:02:13 2011
@@ -27,10 +27,12 @@ import java.util.List;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
 import java.util.concurrent.CopyOnWriteArrayList;
+import java.util.logging.Logger;
 
 import org.apache.cxf.bus.extension.Extension;
 import org.apache.cxf.bus.extension.ExtensionFragmentParser;
 import org.apache.cxf.bus.extension.ExtensionRegistry;
+import org.apache.cxf.common.logging.LogUtils;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleContext;
@@ -41,6 +43,7 @@ import org.osgi.framework.SynchronousBun
  * 
  */
 public class OSGiExtensionLocator implements BundleActivator, SynchronousBundleListener {
+    private static final Logger LOG = LogUtils.getL7dLogger(OSGiExtensionLocator.class);
     private ConcurrentMap<Long, List<Extension>> extensions 
         = new ConcurrentHashMap<Long, List<Extension>>();
     private long id;
@@ -92,7 +95,7 @@ public class OSGiExtensionLocator implem
                 List<Extension> orig = new ExtensionFragmentParser()
                     .getExtensionsFromText(ins);
                 ins.close();
-
+                LOG.info("Loading the extension from bundle " + bundle.getBundleId());
                 if (orig != null && !orig.isEmpty()) {
                     if (list == null) {
                         list = new CopyOnWriteArrayList<Extension>();
@@ -109,6 +112,7 @@ public class OSGiExtensionLocator implem
     protected void unregister(final long bundleId) {
         List<Extension> list = extensions.remove(bundleId);
         if (list != null) {
+            LOG.info("Removed the extensions for bundle " + bundleId);
             ExtensionRegistry.removeExtensions(list);
         }
     }
@@ -136,6 +140,7 @@ public class OSGiExtensionLocator implem
             }
             return super.loadInterface(cl);
         }
+       
     }
 
 }



Mime
View raw message