activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dej...@apache.org
Subject svn commit: r942131 - in /activemq/trunk/activemq-core/src: main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java test/java/org/apache/activemq/network/DuplexNetworkTest.java
Date Fri, 07 May 2010 15:48:53 GMT
Author: dejanb
Date: Fri May  7 15:48:53 2010
New Revision: 942131

URL: http://svn.apache.org/viewvc?rev=942131&view=rev
Log:
https://issues.apache.org/activemq/browse/AMQ-2706 - request-reply over network

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/DuplexNetworkTest.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java?rev=942131&r1=942130&r2=942131&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java
Fri May  7 15:48:53 2010
@@ -473,7 +473,8 @@ public abstract class DemandForwardingBr
                     if (isDuplex()) {
                         if (command.isMessage()) {
                             ActiveMQMessage message = (ActiveMQMessage) command;
-                            if (AdvisorySupport.isConsumerAdvisoryTopic(message.getDestination()))
{
+                            if (AdvisorySupport.isConsumerAdvisoryTopic(message.getDestination())

+                                || AdvisorySupport.isDestinationAdvisoryTopic(message.getDestination()))
{
                                 serviceRemoteConsumerAdvisory(message.getDataStructure());
                             } else {
                                 if (!isPermissableDestination(message.getDestination(), true))
{

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/DuplexNetworkTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/DuplexNetworkTest.java?rev=942131&r1=942130&r2=942131&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/DuplexNetworkTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/DuplexNetworkTest.java
Fri May  7 15:48:53 2010
@@ -16,6 +16,9 @@
  */
 package org.apache.activemq.network;
 
+import javax.jms.MessageProducer;
+import javax.jms.TemporaryQueue;
+
 import org.apache.activemq.broker.BrokerService;
 
 public class DuplexNetworkTest extends SimpleNetworkTest {
@@ -30,4 +33,15 @@ public class DuplexNetworkTest extends S
         broker.addConnector("tcp://localhost:61617");
         return broker;
     }
+    
+    public void testTempQueues() throws Exception {
+        TemporaryQueue temp = localSession.createTemporaryQueue();
+        MessageProducer producer = localSession.createProducer(temp);
+        producer.send(localSession.createTextMessage("test"));
+        Thread.sleep(100);
+        assertEquals("Destination not created", 1, remoteBroker.getAdminView().getTemporaryQueues().length);
+        temp.delete();
+        Thread.sleep(100);
+        assertEquals("Destination not deleted", 0, remoteBroker.getAdminView().getTemporaryQueues().length);
+    }
 }



Mime
View raw message