diff --git a/activemq-core/src/main/java/org/apache/activemq/network/jms/InboundQueueBridge.java b/activemq-core/src/main/java/org/apache/activemq/network/jms/InboundQueueBridge.java index 8ef03434ce..88f152ac67 100755 --- a/activemq-core/src/main/java/org/apache/activemq/network/jms/InboundQueueBridge.java +++ b/activemq-core/src/main/java/org/apache/activemq/network/jms/InboundQueueBridge.java @@ -28,12 +28,14 @@ package org.apache.activemq.network.jms; public class InboundQueueBridge extends QueueBridge{ String inboundQueueName; + String localQueueName; /** * Constructor that takes a foriegn destination as an argument * @param inboundQueueName */ public InboundQueueBridge(String inboundQueueName){ this.inboundQueueName = inboundQueueName; + this.localQueueName = inboundQueueName; } /** @@ -54,6 +56,23 @@ public class InboundQueueBridge extends QueueBridge{ */ public void setInboundQueueName(String inboundQueueName){ this.inboundQueueName=inboundQueueName; + if (this.localQueueName == null){ + this.localQueueName = inboundQueueName; + } + } + + /** + * @return the localQueueName + */ + public String getLocalQueueName(){ + return localQueueName; + } + + /** + * @param localQueueName the localQueueName to set + */ + public void setLocalQueueName(String localQueueName){ + this.localQueueName=localQueueName; } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/network/jms/InboundTopicBridge.java b/activemq-core/src/main/java/org/apache/activemq/network/jms/InboundTopicBridge.java index c43fc8c2d0..a9250147b5 100755 --- a/activemq-core/src/main/java/org/apache/activemq/network/jms/InboundTopicBridge.java +++ b/activemq-core/src/main/java/org/apache/activemq/network/jms/InboundTopicBridge.java @@ -28,12 +28,14 @@ package org.apache.activemq.network.jms; public class InboundTopicBridge extends TopicBridge{ String inboundTopicName; + String localTopicName; /** * Constructor that takes a foriegn destination as an argument * @param inboundTopicName */ public InboundTopicBridge(String inboundTopicName){ this.inboundTopicName = inboundTopicName; + this.localTopicName = inboundTopicName; } /** @@ -50,10 +52,27 @@ public class InboundTopicBridge extends TopicBridge{ } /** - * @param outboundTopicName The outboundTopicName to set. + * @param inboundTopicName */ public void setInboundTopicName(String inboundTopicName){ this.inboundTopicName=inboundTopicName; + if(this.localTopicName==null){ + this.localTopicName = inboundTopicName; + } + } + + /** + * @return the localTopicName + */ + public String getLocalTopicName(){ + return localTopicName; + } + + /** + * @param localTopicName the localTopicName to set + */ + public void setLocalTopicName(String localTopicName){ + this.localTopicName=localTopicName; } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/network/jms/JmsQueueConnector.java b/activemq-core/src/main/java/org/apache/activemq/network/jms/JmsQueueConnector.java index 0aadb03187..f7a7f19b99 100755 --- a/activemq-core/src/main/java/org/apache/activemq/network/jms/JmsQueueConnector.java +++ b/activemq-core/src/main/java/org/apache/activemq/network/jms/JmsQueueConnector.java @@ -263,8 +263,9 @@ public class JmsQueueConnector extends JmsConnector{ QueueSession localSession = localQueueConnection.createQueueSession(false,Session.AUTO_ACKNOWLEDGE); for(int i=0;i