mirror of https://github.com/apache/activemq.git
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/branches/activemq-4.0@441189 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a2efa7e2e3
commit
a02fd05f57
|
@ -44,6 +44,7 @@ public class CompositeDemandForwardingBridge extends DemandForwardingBridgeSuppo
|
|||
public CompositeDemandForwardingBridge(Transport localBroker, Transport remoteBroker) {
|
||||
super(localBroker, remoteBroker);
|
||||
remoteBrokerName = remoteBroker.toString();
|
||||
remoteBrokerNameKnownLatch.countDown();
|
||||
}
|
||||
|
||||
protected void serviceRemoteBrokerInfo(Command command) throws IOException {
|
||||
|
|
|
@ -57,6 +57,7 @@ public class DemandForwardingBridge extends DemandForwardingBridgeSupport {
|
|||
ServiceSupport.dispose(this);
|
||||
}
|
||||
}
|
||||
remoteBrokerNameKnownLatch.countDown();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -100,6 +100,7 @@ public abstract class DemandForwardingBridgeSupport implements Bridge {
|
|||
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 @@ public abstract class DemandForwardingBridgeSupport implements Bridge {
|
|||
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;
|
||||
|
|
Loading…
Reference in New Issue