You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2019/07/23 07:22:19 UTC
[camel] branch master updated (4872dfc -> 4bbc471)
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git.
from 4872dfc Camel 13755 (#3053)
new 1641265 Camel-CXF: Use BindToRegistry where possible
new 4bbc471 Removed unused imports
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../camel/component/cxf/CxfProducerSessionTest.java | 17 ++++++++---------
.../jaxrs/CxfRsBindingConfigurationSelectionTest.java | 12 ++++--------
2 files changed, 12 insertions(+), 17 deletions(-)
[camel] 02/02: Removed unused imports
Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 4bbc47165111d9b94e8dfd1e2ff8b307c969495d
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Jul 23 09:18:28 2019 +0200
Removed unused imports
---
.../java/org/apache/camel/component/cxf/CxfProducerSessionTest.java | 2 +-
.../component/cxf/jaxrs/CxfRsBindingConfigurationSelectionTest.java | 1 -
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerSessionTest.java b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerSessionTest.java
index 9278d91..ae9cfb5 100644
--- a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerSessionTest.java
+++ b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerSessionTest.java
@@ -15,6 +15,7 @@
* limitations under the License.
*/
package org.apache.camel.component.cxf;
+
import java.util.Collections;
import java.util.Map;
@@ -23,7 +24,6 @@ import org.apache.camel.CamelExecutionException;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.http.common.cookie.ExchangeCookieHandler;
import org.apache.camel.http.common.cookie.InstanceCookieHandler;
-import org.apache.camel.impl.JndiRegistry;
import org.apache.camel.test.junit4.CamelTestSupport;
import org.apache.cxf.Bus;
import org.apache.cxf.BusFactory;
diff --git a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsBindingConfigurationSelectionTest.java b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsBindingConfigurationSelectionTest.java
index ddaf5ad..3ae7eec 100644
--- a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsBindingConfigurationSelectionTest.java
+++ b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsBindingConfigurationSelectionTest.java
@@ -27,7 +27,6 @@ import org.apache.camel.Exchange;
import org.apache.camel.Message;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.cxf.CXFTestSupport;
-import org.apache.camel.impl.JndiRegistry;
import org.apache.camel.test.junit4.CamelTestSupport;
import org.junit.Test;
[camel] 01/02: Camel-CXF: Use BindToRegistry where possible
Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 1641265e649d42ff3b54e5d29fad2d31ff1be6f8
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Jul 23 09:17:32 2019 +0200
Camel-CXF: Use BindToRegistry where possible
---
.../camel/component/cxf/CxfProducerSessionTest.java | 15 +++++++--------
.../cxf/jaxrs/CxfRsBindingConfigurationSelectionTest.java | 11 ++++-------
2 files changed, 11 insertions(+), 15 deletions(-)
diff --git a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerSessionTest.java b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerSessionTest.java
index ad9fe43..9278d91 100644
--- a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerSessionTest.java
+++ b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerSessionTest.java
@@ -18,6 +18,7 @@ package org.apache.camel.component.cxf;
import java.util.Collections;
import java.util.Map;
+import org.apache.camel.BindToRegistry;
import org.apache.camel.CamelExecutionException;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.http.common.cookie.ExchangeCookieHandler;
@@ -39,6 +40,12 @@ public class CxfProducerSessionTest extends CamelTestSupport {
private static final String REQUEST_MESSAGE_EXPRESSION = "<ns1:echo xmlns:ns1=\"http://cxf.component.camel.apache.org/\"><arg0>${in.body}</arg0></ns1:echo>";
private static final Map<String, String> NAMESPACES = Collections.singletonMap("ns1", "http://cxf.component.camel.apache.org/");
private static final String PARAMETER_XPATH = "/ns1:echoResponse/return/text()";
+
+ @BindToRegistry("instanceCookieHandler")
+ private InstanceCookieHandler ich = new InstanceCookieHandler();
+
+ @BindToRegistry("exchangeCookieHandler")
+ private ExchangeCookieHandler ech = new ExchangeCookieHandler();
private String url = "cxf://" + SIMPLE_SERVER_ADDRESS + "?serviceClass=org.apache.camel.component.cxf.EchoService&dataFormat=PAYLOAD&synchronous=true";
@@ -145,12 +152,4 @@ public class CxfProducerSessionTest extends CamelTestSupport {
}
};
}
-
- @Override
- protected JndiRegistry createRegistry() throws Exception {
- JndiRegistry jndiRegistry = super.createRegistry();
- jndiRegistry.bind("instanceCookieHandler", new InstanceCookieHandler());
- jndiRegistry.bind("exchangeCookieHandler", new ExchangeCookieHandler());
- return jndiRegistry;
- }
}
diff --git a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsBindingConfigurationSelectionTest.java b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsBindingConfigurationSelectionTest.java
index cc62870..ddaf5ad 100644
--- a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsBindingConfigurationSelectionTest.java
+++ b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsBindingConfigurationSelectionTest.java
@@ -22,6 +22,7 @@ import java.util.Map;
import javax.ws.rs.client.Entity;
import javax.ws.rs.core.MultivaluedMap;
+import org.apache.camel.BindToRegistry;
import org.apache.camel.Exchange;
import org.apache.camel.Message;
import org.apache.camel.builder.RouteBuilder;
@@ -43,6 +44,9 @@ public class CxfRsBindingConfigurationSelectionTest extends CamelTestSupport {
private static final String CXF_RS_ENDPOINT_URI_DEFAULT = String.format("cxfrs://http://localhost:%s/CxfRsConsumerTest/rest?bindingStyle=Default&", CXFTestSupport.getPort3()) + RESOURCE_CLASS;
private static final String CXF_RS_ENDPOINT_URI_NONE = String.format("cxfrs://http://localhost:%s/CxfRsConsumerTest/rest?", CXFTestSupport.getPort4()) + RESOURCE_CLASS;
+ @BindToRegistry("binding")
+ private DummyCxfRsBindingImplementation dummyCxfRsBindingImplementation = new DummyCxfRsBindingImplementation();
+
@Test
public void testCxfRsBindingConfiguration() {
// check binding styles
@@ -61,13 +65,6 @@ public class CxfRsBindingConfigurationSelectionTest extends CamelTestSupport {
private CxfRsEndpoint endpointForRouteId(String routeId) {
return (CxfRsEndpoint) context.getRoute(routeId).getConsumer().getEndpoint();
}
-
- @Override
- protected JndiRegistry createRegistry() throws Exception {
- JndiRegistry answer = super.createRegistry();
- answer.bind("binding", new DummyCxfRsBindingImplementation());
- return answer;
- }
protected RouteBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {