cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cschnei...@apache.org
Subject [2/5] cxf git commit: CXF-6199 Make sure concurrentConsumers can be configured on JMSEndpoint
Date Mon, 26 Jan 2015 10:23:18 GMT
CXF-6199 Make sure concurrentConsumers can be configured on JMSEndpoint


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

Branch: refs/heads/3.0.x-fixes
Commit: 15fa235ac9239571ed10c9ab83c4146e73b72942
Parents: 5ae70f4
Author: Christian Schneider <chris@die-schneider.net>
Authored: Tue Jan 20 00:02:19 2015 +0100
Committer: Christian Schneider <chris@die-schneider.net>
Committed: Mon Jan 26 10:41:32 2015 +0100

----------------------------------------------------------------------
 .../java/org/apache/cxf/transport/jms/JMSConfigFactory.java  | 1 +
 .../org/apache/cxf/transport/jms/JMSConfigFactoryTest.java   | 8 ++++++++
 2 files changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/15fa235a/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 e5ec995..464fc7a 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
@@ -85,6 +85,7 @@ public final class JMSConfigFactory {
         jmsConfig.setConduitSelectorPrefix(endpoint.getConduitIdSelectorPrefix());
         jmsConfig.setUserName(endpoint.getUsername());
         jmsConfig.setPassword(endpoint.getPassword());
+        jmsConfig.setConcurrentConsumers(endpoint.getConcurrentConsumers());
 
         TransactionManager tm = getTransactionManager(bus, endpoint);
         jmsConfig.setTransactionManager(tm);

http://git-wip-us.apache.org/repos/asf/cxf/blob/15fa235a/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 1198b9e..9008732 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
@@ -79,4 +79,12 @@ public class JMSConfigFactoryTest extends AbstractJMSTester {
         Assert.assertEquals("java:/comp/TransactionManager", endpoint.getJndiTransactionManagerName());
         // TODO Check JNDI lookup
     }
+    
+    @Test
+    public void testConcurrentConsumers() {
+        JMSEndpoint endpoint = new JMSEndpoint("jms:queue:Foo.Bar?concurrentConsumers=4");
+        JMSConfiguration jmsConfig = JMSConfigFactory.createFromEndpoint(bus, endpoint);
+        Assert.assertEquals(4, jmsConfig.getConcurrentConsumers());
+
+    }
 }


Mime
View raw message