From 16d403f5354ff7428e54f78ea0fbd360b54259b1 Mon Sep 17 00:00:00 2001 From: "Hiram R. Chirino" Date: Fri, 7 Jul 2006 00:52:53 +0000 Subject: [PATCH] http://issues.apache.org/activemq/browse/AMQ-799 git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@419753 13f79535-47bb-0310-9956-ffa450edef68 --- .../network/DemandForwardingBridgeSupport.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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 6c712af3d0..2b0c25cd7c 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 @@ -25,6 +25,7 @@ import org.apache.activemq.command.ActiveMQTopic; import org.apache.activemq.command.BrokerId; import org.apache.activemq.command.BrokerInfo; import org.apache.activemq.command.Command; +import org.apache.activemq.command.ConnectionError; import org.apache.activemq.command.ConnectionId; import org.apache.activemq.command.ConnectionInfo; import org.apache.activemq.command.ConsumerId; @@ -317,7 +318,7 @@ public abstract class DemandForwardingBridgeSupport implements Bridge { } } - protected void serviceRemoteException(Exception error) { + protected void serviceRemoteException(Throwable error) { log.info("Network connection between "+localBroker+" and "+remoteBroker+" shutdown: "+error.getMessage(),error); ServiceSupport.dispose(this); } @@ -336,6 +337,9 @@ public abstract class DemandForwardingBridgeSupport implements Bridge { } }else if(command.isBrokerInfo()){ serviceRemoteBrokerInfo(command); + }else if(command.getClass() == ConnectionError.class ) { + ConnectionError ce = (ConnectionError) command; + serviceRemoteException(ce.getException()); }else{ switch(command.getDataStructureType()){ case KeepAliveInfo.DATA_STRUCTURE_TYPE: @@ -520,7 +524,9 @@ public abstract class DemandForwardingBridgeSupport implements Bridge { shutDown = true; doStop(); } - + }else if(command.getClass() == ConnectionError.class ) { + ConnectionError ce = (ConnectionError) command; + serviceLocalException(ce.getException()); }else{ switch(command.getDataStructureType()){ case WireFormatInfo.DATA_STRUCTURE_TYPE: