From 2bda17a6b0075ffbe397c6d3b62ebdc2810c1683 Mon Sep 17 00:00:00 2001 From: Bosanac Dejan Date: Wed, 28 Jan 2009 09:50:31 +0000 Subject: [PATCH] additional fix for https://issues.apache.org/activemq/browse/AMQ-2086 and a couple of improvements for network tests git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@738421 13f79535-47bb-0310-9956-ffa450edef68 --- activemq-core/pom.xml | 3 --- .../network/DemandForwardingBridgeSupport.java | 18 +++++++++++++----- .../activemq/network/duplexLocalBroker.xml | 2 +- .../apache/activemq/network/remoteBroker.xml | 2 +- 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/activemq-core/pom.xml b/activemq-core/pom.xml index 0605597bc3..250b8c63d0 100755 --- a/activemq-core/pom.xml +++ b/activemq-core/pom.xml @@ -388,9 +388,6 @@ **/load/* - - **/SimpleNetworkTest.* - **/FanoutTransportBrokerTest.* diff --git a/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java b/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java index 5bc4ca2eb2..352909f4e3 100644 --- a/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java +++ b/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java @@ -441,7 +441,7 @@ public abstract class DemandForwardingBridgeSupport implements NetworkBridge, Br if (AdvisorySupport.isConsumerAdvisoryTopic(message.getDestination())) { serviceRemoteConsumerAdvisory(message.getDataStructure()); } else { - if (!isPermissableDestination(message.getDestination())) { + if (!isPermissableDestination(message.getDestination(), true)) { return; } if (message.isResponseRequired()) { @@ -853,12 +853,20 @@ public abstract class DemandForwardingBridgeSupport implements NetworkBridge, Br rc[brokerPath.length] = idToAppend; return rc; } - + protected boolean isPermissableDestination(ActiveMQDestination destination) { + return isPermissableDestination(destination, false); + } + + protected boolean isPermissableDestination(ActiveMQDestination destination, boolean allowTemporary) { // Are we not bridging temp destinations? - if (destination.isTemporary() && !configuration.isBridgeTempDestinations()) { - return false; - } + if (destination.isTemporary()) { + if (allowTemporary) { + return true; + } else { + return configuration.isBridgeTempDestinations(); + } + } DestinationFilter filter = DestinationFilter.parseFilter(destination); ActiveMQDestination[] dests = excludedDestinations; diff --git a/activemq-core/src/test/resources/org/apache/activemq/network/duplexLocalBroker.xml b/activemq-core/src/test/resources/org/apache/activemq/network/duplexLocalBroker.xml index ade8045923..5b00d42edc 100644 --- a/activemq-core/src/test/resources/org/apache/activemq/network/duplexLocalBroker.xml +++ b/activemq-core/src/test/resources/org/apache/activemq/network/duplexLocalBroker.xml @@ -18,7 +18,7 @@ - + diff --git a/activemq-core/src/test/resources/org/apache/activemq/network/remoteBroker.xml b/activemq-core/src/test/resources/org/apache/activemq/network/remoteBroker.xml index 90301f191f..9190cef7d1 100644 --- a/activemq-core/src/test/resources/org/apache/activemq/network/remoteBroker.xml +++ b/activemq-core/src/test/resources/org/apache/activemq/network/remoteBroker.xml @@ -18,7 +18,7 @@ - +