activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r433244 - in /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network: CompositeDemandForwardingBridge.java DemandForwardingBridge.java DemandForwardingBridgeSupport.java
Date Mon, 21 Aug 2006 13:43:42 GMT
Author: chirino
Date: Mon Aug 21 06:43:39 2006
New Revision: 433244

URL: http://svn.apache.org/viewvc?rev=433244&view=rev
Log:
Fix for http://issues.apache.org/activemq/browse/AMQ-886

Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/CompositeDemandForwardingBridge.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridge.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/CompositeDemandForwardingBridge.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/CompositeDemandForwardingBridge.java?rev=433244&r1=433243&r2=433244&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/CompositeDemandForwardingBridge.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/CompositeDemandForwardingBridge.java
Mon Aug 21 06:43:39 2006
@@ -44,6 +44,7 @@
     public CompositeDemandForwardingBridge(Transport localBroker, Transport remoteBroker)
{
         super(localBroker, remoteBroker);
         remoteBrokerName = remoteBroker.toString();
+    	remoteBrokerNameKnownLatch.countDown();
     }
 
     protected void serviceRemoteBrokerInfo(Command command) throws IOException {

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridge.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridge.java?rev=433244&r1=433243&r2=433244&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridge.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridge.java
Mon Aug 21 06:43:39 2006
@@ -57,6 +57,7 @@
                     ServiceSupport.dispose(this);
                 }
             }
+        	remoteBrokerNameKnownLatch.countDown();
         }
     }
 

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java?rev=433244&r1=433243&r2=433244&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java
Mon Aug 21 06:43:39 2006
@@ -100,6 +100,7 @@
     protected final ConcurrentHashMap subscriptionMapByRemoteId = new ConcurrentHashMap();
     protected final BrokerId localBrokerPath[] = new BrokerId[] { null };
     protected CountDownLatch startedLatch = new CountDownLatch(2);
+    protected CountDownLatch remoteBrokerNameKnownLatch = new CountDownLatch(1);
     protected boolean decreaseNetworkConsumerPriority;
     protected int networkTTL = 1;
     protected final AtomicBoolean remoteInterupted = new AtomicBoolean(false);
@@ -212,6 +213,9 @@
     protected void startLocalBridge() throws Exception {
         if(localBridgeStarted.compareAndSet(false,true)){
             synchronized( this ) {
+            	
+        		remoteBrokerNameKnownLatch.await();
+
 	            localConnectionInfo=new ConnectionInfo();
 	            localConnectionInfo.setConnectionId(new ConnectionId(idGenerator.generateId()));
 	            localClientId="NC_"+remoteBrokerName+"_inbound"+name;



Mime
View raw message