You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2014/10/30 03:34:02 UTC
[1/3] git commit: CAMEL-7975 Reversed the header encoding in
camel-sjms with thanks to Aaron
Repository: camel
Updated Branches:
refs/heads/master 3fc8e514f -> 76c3a420c
CAMEL-7975 Reversed the header encoding in camel-sjms with thanks to Aaron
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/76c3a420
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/76c3a420
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/76c3a420
Branch: refs/heads/master
Commit: 76c3a420cda9d24eb7aed4c239530d8acb9b640d
Parents: 8c5769f
Author: Willem Jiang <wi...@gmail.com>
Authored: Thu Oct 30 10:33:17 2014 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Thu Oct 30 10:33:50 2014 +0800
----------------------------------------------------------------------
.../apache/camel/component/sjms/SjmsExchangeMessageHelper.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/76c3a420/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsExchangeMessageHelper.java
----------------------------------------------------------------------
diff --git a/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsExchangeMessageHelper.java b/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsExchangeMessageHelper.java
index 7d2c8c4..7b7c66b 100644
--- a/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsExchangeMessageHelper.java
+++ b/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsExchangeMessageHelper.java
@@ -454,7 +454,8 @@ public final class SjmsExchangeMessageHelper {
throw new IllegalHeaderException("Header " + key + " is not a legal JMS header name value");
}
Object value = jmsMessage.getObjectProperty(key);
- headers.put(key, value);
+ String decodedName = new DefaultJmsKeyFormatStrategy().decodeKey(key);
+ headers.put(decodedName, value);
}
}
if (out) {
[3/3] git commit: Fixed a CS error of camel-netty
Posted by ni...@apache.org.
Fixed a CS error of camel-netty
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/adc9b89d
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/adc9b89d
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/adc9b89d
Branch: refs/heads/master
Commit: adc9b89d68cbf3f71da1b0be74318dc674c67416
Parents: 3fc8e51
Author: Willem Jiang <wi...@gmail.com>
Authored: Thu Oct 30 09:52:19 2014 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Thu Oct 30 10:33:50 2014 +0800
----------------------------------------------------------------------
.../apache/camel/component/netty/DefaultClientPipelineFactory.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/adc9b89d/components/camel-netty/src/main/java/org/apache/camel/component/netty/DefaultClientPipelineFactory.java
----------------------------------------------------------------------
diff --git a/components/camel-netty/src/main/java/org/apache/camel/component/netty/DefaultClientPipelineFactory.java b/components/camel-netty/src/main/java/org/apache/camel/component/netty/DefaultClientPipelineFactory.java
index fe6dd9b..b997720 100644
--- a/components/camel-netty/src/main/java/org/apache/camel/component/netty/DefaultClientPipelineFactory.java
+++ b/components/camel-netty/src/main/java/org/apache/camel/component/netty/DefaultClientPipelineFactory.java
@@ -1,5 +1,5 @@
/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
+ * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
[2/3] git commit: Added isMockEndpointUnit test accroding the mailing
list question
Posted by ni...@apache.org.
Added isMockEndpointUnit test accroding the mailing list question
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/8c5769fe
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/8c5769fe
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/8c5769fe
Branch: refs/heads/master
Commit: 8c5769fe143f3c22e08c340fae0b7ef6f54b744b
Parents: adc9b89
Author: Willem Jiang <wi...@gmail.com>
Authored: Thu Oct 30 09:55:05 2014 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Thu Oct 30 10:33:50 2014 +0800
----------------------------------------------------------------------
.../blueprint/IsMockEndpointJUnit4Test.java | 76 ++++++++++++++++++++
.../camel/test/blueprint/IsMockEndpoints.xml | 46 ++++++++++++
2 files changed, 122 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/8c5769fe/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/IsMockEndpointJUnit4Test.java
----------------------------------------------------------------------
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/IsMockEndpointJUnit4Test.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/IsMockEndpointJUnit4Test.java
new file mode 100644
index 0000000..a403c90
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/IsMockEndpointJUnit4Test.java
@@ -0,0 +1,76 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.apache.camel.EndpointInject;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.junit.Test;
+
+public class IsMockEndpointJUnit4Test extends CamelBlueprintTestSupport {
+
+ @EndpointInject (uri = "mock:seda:result", context = "IsMockEndpoints")
+ private MockEndpoint mockSeda;
+
+ @EndpointInject (uri = "mock:bar", context = "IsMockEndpoints")
+ private MockEndpoint mockBar;
+
+ @EndpointInject (uri = "mock:baz", context = "IsMockEndpoints")
+ private MockEndpoint mockBaz;
+
+ @Override
+ protected String getBlueprintDescriptor() {
+ return "org/apache/camel/test/blueprint/IsMockEndpoints.xml";
+ }
+
+ @Override
+ public String isMockEndpoints() {
+ return "*";
+ }
+
+
+ @Test
+ public void testMockAllEndpoints() throws Exception {
+ mockSeda.expectedBodiesReceived("bar");
+ mockBar.expectedBodiesReceived("bar");
+
+ template.sendBody("direct:foo", "Hello World");
+
+ assertNotNull(context.hasEndpoint("mock:seda:result"));
+ assertNotNull(context.hasEndpoint("mock:baz"));
+ assertMockEndpointsSatisfied();
+ }
+
+ @Test
+ public void testMockBar() throws Exception {
+ mockBar.expectedBodiesReceived("bar");
+
+ template.sendBody("direct:foo", "Hello World");
+
+ assertNotNull(context.hasEndpoint("mock:bar"));
+ assertMockEndpointsSatisfied();
+ }
+
+ @Test
+ public void testMockBaz() throws Exception {
+ mockBaz.expectedBodiesReceived("baz");
+
+ template.sendBody("direct:foo", "Hello World");
+
+ assertNotNull(context.hasEndpoint("mock:baz"));
+ assertMockEndpointsSatisfied();
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/8c5769fe/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/IsMockEndpoints.xml
----------------------------------------------------------------------
diff --git a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/IsMockEndpoints.xml b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/IsMockEndpoints.xml
new file mode 100644
index 0000000..269aaa4
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/IsMockEndpoints.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:camel="http://camel.apache.org/schema/blueprint" xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+ http://www.osgi.org/xmlns/blueprint/v1.0.0
+ http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
+ http://camel.apache.org/schema/blueprint
+ http://camel.apache.org/schema/blueprint/camel-blueprint.xsd">
+
+ <camelContext id="IsMockEndpoints" trace="false" xmlns="http://camel.apache.org/schema/blueprint">
+
+ <route id="IsMockEndpointsRoute">
+ <from uri="direct:foo" />
+ <setBody>
+ <simple>bar</simple>
+ </setBody>
+ <to uri="seda:result" />
+ <to uri="mock:bar" />
+ </route>
+ <route>
+ <from uri="seda:result" />
+ <setBody>
+ <simple>baz</simple>
+ </setBody>
+ <to uri="mock:baz" />
+ </route>
+
+ </camelContext>
+
+</blueprint>