Repository: camel Updated Branches: refs/heads/master 2e727bd3d -> 49afa6338
Component docs Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/49afa633 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/49afa633 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/49afa633 Branch: refs/heads/master Commit: 49afa6338d21ce32b27fa6d2e5da2f04549a3488 Parents: 2e727bd Author: Claus Ibsen <davscl...@apache.org> Authored: Fri Jun 19 11:01:35 2015 +0200 Committer: Claus Ibsen <davscl...@apache.org> Committed: Fri Jun 19 11:01:35 2015 +0200 ---------------------------------------------------------------------- .../camel/component/cxf/jaxrs/CxfRsComponent.java | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/49afa633/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsComponent.java ---------------------------------------------------------------------- diff --git a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsComponent.java b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsComponent.java index 1bedb55..228ea89 100644 --- a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsComponent.java +++ b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsComponent.java @@ -29,12 +29,16 @@ import org.apache.camel.util.CamelContextHelper; import org.apache.camel.util.CastUtils; import org.apache.camel.util.ObjectHelper; import org.apache.cxf.jaxrs.AbstractJAXRSFactoryBean; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Defines the <a href="http://camel.apache.org/cxfrs.html">CXF RS Component</a> */ public class CxfRsComponent extends HeaderFilterStrategyComponent { + private static final Logger LOG = LoggerFactory.getLogger(CxfRsComponent.class); + public CxfRsComponent() { super(CxfRsEndpoint.class); } @@ -45,7 +49,18 @@ public class CxfRsComponent extends HeaderFilterStrategyComponent { @Override protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception { - CxfRsEndpoint answer = null; + + CxfRsEndpoint answer; + + Object value = parameters.remove("setDefaultBus"); + if (value != null) { + LOG.warn("The option setDefaultBus is @deprecated, use name defaultBus instead"); + if (!parameters.containsKey("defaultBus")) { + parameters.put("defaultBus", value); + } + } + + if (remaining.startsWith(CxfConstants.SPRING_CONTEXT_ENDPOINT)) { // Get the bean from the Spring context String beanId = remaining.substring(CxfConstants.SPRING_CONTEXT_ENDPOINT.length());