activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r441189 - in /incubator/activemq/branches/activemq-4.0/activemq-core/src/main/java/org/apache/activemq/network: CompositeDemandForwardingBridge.java DemandForwardingBridge.java DemandForwardingBridgeSupport.java
Date Thu, 07 Sep 2006 19:37:04 GMT
Author: chirino
Date: Thu Sep  7 12:37:04 2006
New Revision: 441189

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

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

Modified: incubator/activemq/branches/activemq-4.0/activemq-core/src/main/java/org/apache/activemq/network/CompositeDemandForwardingBridge.java
URL: http://svn.apache.org/viewvc/incubator/activemq/branches/activemq-4.0/activemq-core/src/main/java/org/apache/activemq/network/CompositeDemandForwardingBridge.java?view=diff&rev=441189&r1=441188&r2=441189
==============================================================================
--- incubator/activemq/branches/activemq-4.0/activemq-core/src/main/java/org/apache/activemq/network/CompositeDemandForwardingBridge.java
(original)
+++ incubator/activemq/branches/activemq-4.0/activemq-core/src/main/java/org/apache/activemq/network/CompositeDemandForwardingBridge.java
Thu Sep  7 12:37:04 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/branches/activemq-4.0/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridge.java
URL: http://svn.apache.org/viewvc/incubator/activemq/branches/activemq-4.0/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridge.java?view=diff&rev=441189&r1=441188&r2=441189
==============================================================================
--- incubator/activemq/branches/activemq-4.0/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridge.java
(original)
+++ incubator/activemq/branches/activemq-4.0/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridge.java
Thu Sep  7 12:37:04 2006
@@ -57,6 +57,7 @@
                     ServiceSupport.dispose(this);
                 }
             }
+        	remoteBrokerNameKnownLatch.countDown();
         }
     }
 

Modified: incubator/activemq/branches/activemq-4.0/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java
URL: http://svn.apache.org/viewvc/incubator/activemq/branches/activemq-4.0/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java?view=diff&rev=441189&r1=441188&r2=441189
==============================================================================
--- incubator/activemq/branches/activemq-4.0/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java
(original)
+++ incubator/activemq/branches/activemq-4.0/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java
Thu Sep  7 12:37:04 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