Hiram R. Chirino 2006-07-07 00:52:53 +00:00
parent 06a5829c14
commit 16d403f535
1 changed files with 8 additions and 2 deletions

View File

@ -25,6 +25,7 @@ import org.apache.activemq.command.ActiveMQTopic;
import org.apache.activemq.command.BrokerId; import org.apache.activemq.command.BrokerId;
import org.apache.activemq.command.BrokerInfo; import org.apache.activemq.command.BrokerInfo;
import org.apache.activemq.command.Command; import org.apache.activemq.command.Command;
import org.apache.activemq.command.ConnectionError;
import org.apache.activemq.command.ConnectionId; import org.apache.activemq.command.ConnectionId;
import org.apache.activemq.command.ConnectionInfo; import org.apache.activemq.command.ConnectionInfo;
import org.apache.activemq.command.ConsumerId; 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); log.info("Network connection between "+localBroker+" and "+remoteBroker+" shutdown: "+error.getMessage(),error);
ServiceSupport.dispose(this); ServiceSupport.dispose(this);
} }
@ -336,6 +337,9 @@ public abstract class DemandForwardingBridgeSupport implements Bridge {
} }
}else if(command.isBrokerInfo()){ }else if(command.isBrokerInfo()){
serviceRemoteBrokerInfo(command); serviceRemoteBrokerInfo(command);
}else if(command.getClass() == ConnectionError.class ) {
ConnectionError ce = (ConnectionError) command;
serviceRemoteException(ce.getException());
}else{ }else{
switch(command.getDataStructureType()){ switch(command.getDataStructureType()){
case KeepAliveInfo.DATA_STRUCTURE_TYPE: case KeepAliveInfo.DATA_STRUCTURE_TYPE:
@ -520,7 +524,9 @@ public abstract class DemandForwardingBridgeSupport implements Bridge {
shutDown = true; shutDown = true;
doStop(); doStop();
} }
}else if(command.getClass() == ConnectionError.class ) {
ConnectionError ce = (ConnectionError) command;
serviceLocalException(ce.getException());
}else{ }else{
switch(command.getDataStructureType()){ switch(command.getDataStructureType()){
case WireFormatInfo.DATA_STRUCTURE_TYPE: case WireFormatInfo.DATA_STRUCTURE_TYPE: