Return-Path: X-Original-To: apmail-cxf-commits-archive@www.apache.org Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 921BB1168C for ; Thu, 24 Apr 2014 12:48:54 +0000 (UTC) Received: (qmail 26453 invoked by uid 500); 24 Apr 2014 12:48:53 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 26342 invoked by uid 500); 24 Apr 2014 12:48:51 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 26335 invoked by uid 99); 24 Apr 2014 12:48:51 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Apr 2014 12:48:51 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id B9A31990E47; Thu, 24 Apr 2014 12:48:50 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sergeyb@apache.org To: commits@cxf.apache.org Message-Id: <461a735fc4ca404fa618ea43c417d436@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: [CXF-5410] Optionally disable HTTP OSGI transport Date: Thu, 24 Apr 2014 12:48:50 +0000 (UTC) Repository: cxf Updated Branches: refs/heads/master dc4f09b76 -> 7215e8683 [CXF-5410] Optionally disable HTTP OSGI transport Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/7215e868 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/7215e868 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/7215e868 Branch: refs/heads/master Commit: 7215e8683cbd61efbba96438c9c871aa49c3e5e7 Parents: dc4f09b Author: Sergey Beryozkin Authored: Thu Apr 24 13:48:33 2014 +0100 Committer: Sergey Beryozkin Committed: Thu Apr 24 13:48:33 2014 +0100 ---------------------------------------------------------------------- .../cxf/transport/http/osgi/HTTPTransportActivator.java | 8 ++++++++ 1 file changed, 8 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/7215e868/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 83b37f9..b0dff63 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 @@ -26,6 +26,7 @@ import javax.servlet.Servlet; import org.apache.cxf.bus.blueprint.BlueprintNameSpaceHandlerFactory; import org.apache.cxf.bus.blueprint.NamespaceHandlerRegisterer; +import org.apache.cxf.common.util.PropertyUtils; import org.apache.cxf.transport.http.DestinationRegistry; import org.apache.cxf.transport.http.DestinationRegistryImpl; import org.apache.cxf.transport.http.HTTPConduitConfigurer; @@ -43,7 +44,14 @@ 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"; + public void start(BundleContext context) throws Exception { + + if (PropertyUtils.isTrue(context.getProperty(DISABLE_DEFAULT_HTTP_TRANSPORT))) { + return; + } + ConfigAdminHttpConduitConfigurer conduitConfigurer = new ConfigAdminHttpConduitConfigurer(); DestinationRegistry destinationRegistry = new DestinationRegistryImpl(); HTTPTransportFactory transportFactory = new HTTPTransportFactory(destinationRegistry);