cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject git commit: Don't shutdown the default bus. Create a bus specifically for this.
Date Mon, 06 Oct 2014 19:13:13 GMT
Repository: cxf-dosgi
Updated Branches:
  refs/heads/master ca3a6ef16 -> 96c2acd1e


Don't shutdown the default bus.   Create a bus specifically for this.


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

Branch: refs/heads/master
Commit: 96c2acd1e92de2b413a8cdc2717e8f214e01476b
Parents: ca3a6ef
Author: Daniel Kulp <dkulp@apache.org>
Authored: Mon Oct 6 15:12:16 2014 -0400
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Mon Oct 6 15:12:16 2014 -0400

----------------------------------------------------------------------
 .../src/main/java/org/apache/cxf/dosgi/dsw/Activator.java    | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/96c2acd1/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/Activator.java
----------------------------------------------------------------------
diff --git a/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/Activator.java b/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/Activator.java
index fa4a570..d5e6caa 100644
--- a/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/Activator.java
+++ b/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/Activator.java
@@ -64,6 +64,7 @@ public class Activator implements ManagedService, BundleActivator {
     private BundleContext bc;
     private BundleListener bundleListener;
     private Map<String, Object> curConfiguration;
+    private Bus bus;
 
     public void start(BundleContext bundlecontext) throws Exception {
         LOG.debug("RemoteServiceAdmin Implementation is starting up");
@@ -80,6 +81,8 @@ public class Activator implements ManagedService, BundleActivator {
     }
 
     private synchronized void init(Map<String, Object> config) {
+        bus = BusFactory.newInstance().createBus();
+        
         String httpBase = (String) config.get(org.apache.cxf.dosgi.dsw.Constants.HTTP_BASE);
         String cxfServletAlias = (String) config.get(org.apache.cxf.dosgi.dsw.Constants.CXF_SERVLET_ALIAS);
 
@@ -159,10 +162,9 @@ public class Activator implements ManagedService, BundleActivator {
      * Causes also the shutdown of the embedded HTTP server
      */
     private void shutdownCXFBus() {
-        Bus b = BusFactory.getDefaultBus();
-        if (b != null) {
+        if (bus != null) {
             LOG.debug("Shutting down the CXF Bus");
-            b.shutdown(true);
+            bus.shutdown(true);
         }
     }
 


Mime
View raw message