cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject git commit: [CXF-5410] Making sure does not affect the conduit configurers
Date Thu, 24 Apr 2014 13:10:53 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 7215e8683 -> 37a9b1f83


[CXF-5410] Making sure does not affect the conduit configurers


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

Branch: refs/heads/master
Commit: 37a9b1f838670705504221aa0d7bac15957f0529
Parents: 7215e86
Author: Sergey Beryozkin <sberyozkin@talend.com>
Authored: Thu Apr 24 14:10:39 2014 +0100
Committer: Sergey Beryozkin <sberyozkin@talend.com>
Committed: Thu Apr 24 14:10:39 2014 +0100

----------------------------------------------------------------------
 .../http/osgi/HTTPTransportActivator.java       | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/37a9b1f8/rt/transports/http/src/main/java/org/apache/cxf/transport/http/osgi/HTTPTransportActivator.java
----------------------------------------------------------------------
diff --git a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/osgi/HTTPTransportActivator.java
b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/osgi/HTTPTransportActivator.java
index b0dff63..375046d 100644
--- a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/osgi/HTTPTransportActivator.java
+++ b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/osgi/HTTPTransportActivator.java
@@ -43,28 +43,32 @@ import org.osgi.service.cm.ManagedServiceFactory;
 
 public class HTTPTransportActivator 
     implements BundleActivator {
-    
-    private static final String DISABLE_DEFAULT_HTTP_TRANSPORT = "org.apache.cxf.osgi.http.transport.disable";
+    private static final String CXF_CONFIG_SCOPE = "org.apache.cxf.osgi";
+    private static final String DISABLE_DEFAULT_HTTP_TRANSPORT = CXF_CONFIG_SCOPE + ".http.transport.disable";
     
     public void start(BundleContext context) throws Exception {
         
+        ConfigAdminHttpConduitConfigurer conduitConfigurer = new ConfigAdminHttpConduitConfigurer();
+        
+        registerService(context, ManagedServiceFactory.class, conduitConfigurer, 
+                        ConfigAdminHttpConduitConfigurer.FACTORY_PID);
+        registerService(context, HTTPConduitConfigurer.class, conduitConfigurer, 
+                        "org.apache.cxf.http.conduit-configurer");
+        
         if (PropertyUtils.isTrue(context.getProperty(DISABLE_DEFAULT_HTTP_TRANSPORT))) {
+            //TODO: Review if it also makes sense to support "http.transport.disable" 
+            //      directly in the CXF_CONFIG_SCOPE properties file
             return;
         }
         
-        ConfigAdminHttpConduitConfigurer conduitConfigurer = new ConfigAdminHttpConduitConfigurer();
         DestinationRegistry destinationRegistry = new DestinationRegistryImpl();
         HTTPTransportFactory transportFactory = new HTTPTransportFactory(destinationRegistry);
         Servlet servlet = new CXFNonSpringServlet(destinationRegistry , false);
         ServletConfigurer servletConfig = new ServletConfigurer(context, servlet);
 
-        registerService(context, ManagedServiceFactory.class, conduitConfigurer, 
-                        ConfigAdminHttpConduitConfigurer.FACTORY_PID);
-        registerService(context, HTTPConduitConfigurer.class, conduitConfigurer, 
-                        "org.apache.cxf.http.conduit-configurer");
         context.registerService(DestinationRegistry.class.getName(), destinationRegistry,
null);
         context.registerService(HTTPTransportFactory.class.getName(), transportFactory, null);
-        registerService(context, ManagedService.class, servletConfig, "org.apache.cxf.osgi");
+        registerService(context, ManagedService.class, servletConfig, CXF_CONFIG_SCOPE);
 
         BlueprintNameSpaceHandlerFactory factory = new BlueprintNameSpaceHandlerFactory()
{
             


Mime
View raw message