This is an automated email from the ASF dual-hosted git repository.
ffang pushed a commit to branch 3.4.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git
The following commit(s) were added to refs/heads/3.4.x-fixes by this push:
new c7af5cc [CXF-8431]avoid a very rare race case caused by OSGi async
nature
c7af5cc is described below
commit c7af5cc7de475893943e9789806d963a614e7d53
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
(cherry picked from commit e14cf0a3a572db846e29851ce6d5a65a46c63a7d)
---
.../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 {