servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r704440 - /servicemix/components/bindings/servicemix-jms/trunk/src/main/java/org/apache/servicemix/jms/endpoints/JmsProviderEndpoint.java
Date Tue, 14 Oct 2008 10:31:29 GMT
Author: ffang
Date: Tue Oct 14 03:31:28 2008
New Revision: 704440

URL: http://svn.apache.org/viewvc?rev=704440&view=rev
Log:
[SM-1621]New JMS in/out provider should support temporary queues/topics (as reply destinations)

Modified:
    servicemix/components/bindings/servicemix-jms/trunk/src/main/java/org/apache/servicemix/jms/endpoints/JmsProviderEndpoint.java

Modified: servicemix/components/bindings/servicemix-jms/trunk/src/main/java/org/apache/servicemix/jms/endpoints/JmsProviderEndpoint.java
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-jms/trunk/src/main/java/org/apache/servicemix/jms/endpoints/JmsProviderEndpoint.java?rev=704440&r1=704439&r2=704440&view=diff
==============================================================================
--- servicemix/components/bindings/servicemix-jms/trunk/src/main/java/org/apache/servicemix/jms/endpoints/JmsProviderEndpoint.java
(original)
+++ servicemix/components/bindings/servicemix-jms/trunk/src/main/java/org/apache/servicemix/jms/endpoints/JmsProviderEndpoint.java
Tue Oct 14 03:31:28 2008
@@ -27,6 +27,7 @@
 import javax.jms.Destination;
 import javax.jms.JMSException;
 import javax.jms.Message;
+import javax.jms.Queue;
 import javax.jms.Session;
 import javax.jms.MessageListener;
 
@@ -746,6 +747,14 @@
                                                               (String) dest, 
                                                               isPubSubDomain());
         }
+        //create temp queue/topic if no destination explicitly set
+        if (dest == null) {
+            if (destination instanceof Queue) {
+                return session.createTemporaryQueue();
+            } else {
+                return session.createTemporaryTopic();
+            }
+        } 
         throw new IllegalStateException("Unable to choose a destination for exchange " +
exchange);
     }
 



Mime
View raw message