camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acosent...@apache.org
Subject camel git commit: Revert "CAMEL-9995 Camel-JMS: includeAllJMSXProperties parameter doesn't work"
Date Mon, 22 Aug 2016 09:56:17 GMT
Repository: camel
Updated Branches:
  refs/heads/master 53fc2edda -> 62d59a688


Revert "CAMEL-9995 Camel-JMS: includeAllJMSXProperties parameter doesn't work"

This reverts commit 26e34f471e73be2613f38e5500df2080861040ee.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/62d59a68
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/62d59a68
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/62d59a68

Branch: refs/heads/master
Commit: 62d59a68837d82b1b111b2b501fa7c07d063f7f6
Parents: 53fc2ed
Author: Andrea Cosentino <ancosen@gmail.com>
Authored: Mon Aug 22 11:49:10 2016 +0200
Committer: Andrea Cosentino <ancosen@gmail.com>
Committed: Mon Aug 22 11:49:10 2016 +0200

----------------------------------------------------------------------
 .../component/jms/JmsHeaderFilterStrategy.java    | 18 ++++++++----------
 .../component/jms/JmsHeaderFilteringTest.java     |  4 ++--
 .../jms/JmsNotIncludeAllJMSXPropertiesTest.java   |  2 +-
 .../jms/jmsHeaderFilteringWithSpring.xml          |  8 ++++----
 4 files changed, 15 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/62d59a68/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsHeaderFilterStrategy.java
----------------------------------------------------------------------
diff --git a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsHeaderFilterStrategy.java
b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsHeaderFilterStrategy.java
index 9bea7ed..12c7f04 100644
--- a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsHeaderFilterStrategy.java
+++ b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsHeaderFilterStrategy.java
@@ -36,16 +36,14 @@ public class JmsHeaderFilterStrategy extends DefaultHeaderFilterStrategy
{
     protected void initialize() {
         // ignore provider specified JMS extension headers see page 39 of JMS 1.1 specification
         // added "JMSXRecvTimestamp" as a workaround for an Oracle bug/typo in AqjmsMessage
-        getInFilter().add("JMSXUserID");
-        getInFilter().add("JMSXGroupID");
-        getInFilter().add("JMSXAppID");
-        getInFilter().add("JMSXDeliveryCount");
-        getInFilter().add("JMSXProducerTXID");
-        getInFilter().add("JMSXConsumerTXID");
-        getInFilter().add("JMSXRcvTimestamp");
-        getInFilter().add("JMSXRecvTimestamp");
-        getInFilter().add("JMSXState");
-        getInFilter().add("JMSXGroupSeq");
+        getOutFilter().add("JMSXUserID");
+        getOutFilter().add("JMSXAppID");
+        getOutFilter().add("JMSXDeliveryCount");
+        getOutFilter().add("JMSXProducerTXID");
+        getOutFilter().add("JMSXConsumerTXID");
+        getOutFilter().add("JMSXRcvTimestamp");
+        getOutFilter().add("JMSXRecvTimestamp");
+        getOutFilter().add("JMSXState");
     }
 
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/62d59a68/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsHeaderFilteringTest.java
----------------------------------------------------------------------
diff --git a/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsHeaderFilteringTest.java
b/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsHeaderFilteringTest.java
index 826444e..7f7bba4 100644
--- a/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsHeaderFilteringTest.java
+++ b/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsHeaderFilteringTest.java
@@ -52,7 +52,7 @@ public class JmsHeaderFilteringTest extends CamelTestSupport {
         MockEndpoint errors = this.resolveMandatoryEndpoint(assertionReceiver, MockEndpoint.class);
         errors.expectedMessageCount(0);
 
-        template.send(testQueueEndpointA + "?includeAllJMSXProperties=false", ExchangePattern.InOnly,
new Processor() {
+        template.send(testQueueEndpointA, ExchangePattern.InOnly, new Processor() {
             public void process(Exchange exchange) throws Exception {
                 exchange.getIn().setHeader("org.apache.camel.jms", 10000);
                 exchange.getIn().setHeader("org.apache.camel.test.jms", 20000);
@@ -119,7 +119,7 @@ public class JmsHeaderFilteringTest extends CamelTestSupport {
             assertEquals(20000, message.getJmsMessage().getObjectProperty("org_DOT_apache_DOT_camel_DOT_test_DOT_jms"));
 
             // should be filtered by default
-            assertNotNull(message.getJmsMessage().getStringProperty("JMSXAppID"));
+            assertNull(message.getJmsMessage().getStringProperty("JMSXAppID"));
 
             latch.countDown();
         }

http://git-wip-us.apache.org/repos/asf/camel/blob/62d59a68/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsNotIncludeAllJMSXPropertiesTest.java
----------------------------------------------------------------------
diff --git a/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsNotIncludeAllJMSXPropertiesTest.java
b/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsNotIncludeAllJMSXPropertiesTest.java
index d5b508f..4bb8695 100644
--- a/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsNotIncludeAllJMSXPropertiesTest.java
+++ b/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsNotIncludeAllJMSXPropertiesTest.java
@@ -37,7 +37,7 @@ public class JmsNotIncludeAllJMSXPropertiesTest extends CamelTestSupport
{
     public void testNotIncludeAll() throws Exception {
         getMockEndpoint("mock:result").expectedBodiesReceived("Hello World");
         getMockEndpoint("mock:result").expectedHeaderReceived("foo", "bar");
-        getMockEndpoint("mock:result").expectedHeaderReceived("JMSXUserID", "Donald");
+        getMockEndpoint("mock:result").expectedHeaderReceived("JMSXUserID", null);
         getMockEndpoint("mock:result").expectedHeaderReceived("JMSXAppID", null);
 
         Map headers = new HashMap();

http://git-wip-us.apache.org/repos/asf/camel/blob/62d59a68/components/camel-jms/src/test/resources/org/apache/camel/component/jms/jmsHeaderFilteringWithSpring.xml
----------------------------------------------------------------------
diff --git a/components/camel-jms/src/test/resources/org/apache/camel/component/jms/jmsHeaderFilteringWithSpring.xml
b/components/camel-jms/src/test/resources/org/apache/camel/component/jms/jmsHeaderFilteringWithSpring.xml
index b5d1e50..064d363 100644
--- a/components/camel-jms/src/test/resources/org/apache/camel/component/jms/jmsHeaderFilteringWithSpring.xml
+++ b/components/camel-jms/src/test/resources/org/apache/camel/component/jms/jmsHeaderFilteringWithSpring.xml
@@ -36,7 +36,7 @@
         <property name="headerFilterStrategy">
             <bean
                 class="org.apache.camel.component.jms.JmsHeaderFilterStrategy">
-                <property name="inFilter">
+                <property name="outFilter">
                     <set>
                         <value>JMSXUserID</value>
                         <value>JMSXAppID</value>
@@ -46,12 +46,12 @@
                         <value>JMSXRcvTimestamp</value>
                         <value>JMSXRecvTimestamp</value>
                         <value>JMSXState</value>
-                        <value>testheader</value>
+                        <value>anotherheader</value>
                     </set>
                 </property>
-                <property name="outFilter">
+                <property name="inFilter">
                     <set>
-                        <value>anotherheader</value>
+                        <value>testheader</value>
                     </set>
                 </property>
                 <property name="inFilterPattern" value="(org_apache_camel)[_|a-z|A-Z|0-9]*(test)[_|a-z|A-Z|0-9]*"/>
               


Mime
View raw message