cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [09/12] cxf git commit: [CXF-7235] Support messageSelector This closes #231
Date Thu, 16 Mar 2017 13:06:57 GMT
[CXF-7235] Support messageSelector
This closes #231


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/691fb312
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/691fb312
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/691fb312

Branch: refs/heads/3.0.x-fixes
Commit: 691fb3120a069b3803fc6cc248c6aafdb083bf7b
Parents: ed99f3b
Author: Christian Schneider <chris@die-schneider.net>
Authored: Thu Feb 2 17:55:44 2017 +0100
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Wed Mar 15 14:54:39 2017 -0400

----------------------------------------------------------------------
 .../org/apache/cxf/transport/jms/JMSConfigFactory.java   |  1 +
 .../org/apache/cxf/transport/jms/uri/JMSEndpoint.java    | 11 +++++++++++
 .../apache/cxf/transport/jms/JMSConfigFactoryTest.java   |  7 +++++++
 rt/transports/jms/src/test/resources/jms_test.wsdl       |  5 +++++
 4 files changed, 24 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/691fb312/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfigFactory.java
----------------------------------------------------------------------
diff --git a/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfigFactory.java
b/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfigFactory.java
index 464fc7a..5c4c15b 100644
--- a/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfigFactory.java
+++ b/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfigFactory.java
@@ -129,6 +129,7 @@ public final class JMSConfigFactory {
         
         String targetService = endpoint.getTargetService();
         jmsConfig.setTargetService(targetService);
+        jmsConfig.setMessageSelector(endpoint.getMessageSelector());
         return jmsConfig;
     }
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/691fb312/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/uri/JMSEndpoint.java
----------------------------------------------------------------------
diff --git a/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/uri/JMSEndpoint.java
b/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/uri/JMSEndpoint.java
index 9d104ac..0da94d9 100644
--- a/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/uri/JMSEndpoint.java
+++ b/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/uri/JMSEndpoint.java
@@ -83,6 +83,7 @@ public class JMSEndpoint {
     private boolean useConduitIdSelector = true;
     private String username;
     private int concurrentConsumers = 1;
+    private String messageSelector;
 
     /**
      * @param uri
@@ -456,5 +457,15 @@ public class JMSEndpoint {
             throw new IllegalArgumentException(v);
         }
     }
+
+    public String getMessageSelector() {
+        return messageSelector;
+    }
+
+    public void setMessageSelector(String messageSelector) {
+        this.messageSelector = messageSelector;
+    }
+    
+    
     
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/691fb312/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSConfigFactoryTest.java
----------------------------------------------------------------------
diff --git a/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSConfigFactoryTest.java
b/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSConfigFactoryTest.java
index 9008732..dee65ef 100644
--- a/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSConfigFactoryTest.java
+++ b/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSConfigFactoryTest.java
@@ -87,4 +87,11 @@ public class JMSConfigFactoryTest extends AbstractJMSTester {
         Assert.assertEquals(4, jmsConfig.getConcurrentConsumers());
 
     }
+    
+    @Test
+    public void testMessageSelectorIsSet() {
+        EndpointInfo ei = setupServiceInfo("HelloWorldSelectorService", "HelloWorldPort");
+        JMSConfiguration config = JMSConfigFactory.createFromEndpointInfo(bus, ei, target);
+        Assert.assertEquals("customJMSAttribute=helloWorld", config.getMessageSelector());
       
+    }
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/691fb312/rt/transports/jms/src/test/resources/jms_test.wsdl
----------------------------------------------------------------------
diff --git a/rt/transports/jms/src/test/resources/jms_test.wsdl b/rt/transports/jms/src/test/resources/jms_test.wsdl
index 5c4d26f..2c05636 100644
--- a/rt/transports/jms/src/test/resources/jms_test.wsdl
+++ b/rt/transports/jms/src/test/resources/jms_test.wsdl
@@ -249,4 +249,9 @@
 	        <soap:address location="jms:topic:test.jmstransport.oneway.topic" />
         </port>
     </service>
+    <service name="HelloWorldSelectorService">
+         <port binding="tns:HelloWorldPortBinding" name="HelloWorldPort">
+             <soap:address location="jms:queue:test.jmstransport.text?username=testUser&amp;password=testPassword&amp;messageSelector=customJMSAttribute=helloWorld"
/>
+         </port>
+     </service>
 </definitions>


Mime
View raw message