This is an automated email from the ASF dual-hosted git repository.

ffang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git


The following commit(s) were added to refs/heads/master by this push:
     new e14cf0a  [CXF-8431]avoid a very rare race case caused by OSGi async 
nature
e14cf0a is described below

commit e14cf0a3a572db846e29851ce6d5a65a46c63a7d
Author: Freeman Fang <[email protected]>
AuthorDate: Tue Mar 2 12:20:03 2021 -0500

    [CXF-8431]avoid a very rare race case caused by OSGi async nature
---
 .../transport/http_jetty/osgi/HTTPJettyTransportActivator.java    | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/osgi/HTTPJettyTransportActivator.java
 
b/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/osgi/HTTPJettyTransportActivator.java
index 7aa1ce1..d6b1f1f 100644
--- 
a/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/osgi/HTTPJettyTransportActivator.java
+++ 
b/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/osgi/HTTPJettyTransportActivator.java
@@ -72,10 +72,6 @@ public class HTTPJettyTransportActivator
 
     public void start(BundleContext ctx) throws Exception {
         this.context = ctx;
-        reg = context.registerService(ManagedServiceFactory.class,
-                                      this,
-                                      
CollectionUtils.singletonDictionary(Constants.SERVICE_PID, FACTORY_PID));
-
         mbeanServerTracker = new ServiceTracker<>(ctx, MBeanServer.class, 
null);
         try {
             BlueprintNameSpaceHandlerFactory nsHandlerFactory = new 
BlueprintNameSpaceHandlerFactory() {
@@ -90,6 +86,10 @@ public class HTTPJettyTransportActivator
         } catch (NoClassDefFoundError e) {
             // Blueprint not available, ignore
         }
+        reg = context.registerService(ManagedServiceFactory.class,
+                                      this,
+                                      
CollectionUtils.singletonDictionary(Constants.SERVICE_PID, FACTORY_PID));
+
     }
 
     public void stop(BundleContext ctx) throws Exception {

Reply via email to