cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r909605 - /cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSFactory.java
Date Fri, 12 Feb 2010 21:13:02 GMT
Author: dkulp
Date: Fri Feb 12 21:13:00 2010
New Revision: 909605

URL: http://svn.apache.org/viewvc?rev=909605&view=rev
Log:
[CXF-2662] All JMSFactory to work better with an external
MessageListenerContainer

Patch from javier applied.

Modified:
    cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSFactory.java

Modified: cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSFactory.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSFactory.java?rev=909605&r1=909604&r2=909605&view=diff
==============================================================================
--- cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSFactory.java
(original)
+++ cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSFactory.java
Fri Feb 12 21:13:00 2010
@@ -139,6 +139,17 @@
                                                                     JMSConfiguration jmsConfig,
                                                                     MessageListener listenerHandler,
                                                                     String destinationName)
{
+        
+        if (jmsConfig.getMessageListenerContainer() != null) {
+            AbstractMessageListenerContainer  jmsListener =  jmsConfig.getMessageListenerContainer();
+            if (jmsListener.getMessageListener() == null) {
+                jmsListener.setMessageListener(listenerHandler);
+                jmsListener.initialize();
+                jmsListener.start();
+            }
+            return jmsListener;
+        }
+        
         if (jmsConfig.getMessageListenerContainer() != null) {
             return jmsConfig.getMessageListenerContainer();
         }



Mime
View raw message