ARTEMIS-179 Do not reconnect bridge on DISCONNECT

Note: this breaks scale-down because the bindings are removed.
This commit is contained in:
jbertram 2015-08-05 12:37:53 -05:00
parent f3be78a096
commit 682cad63f3
3 changed files with 7 additions and 4 deletions

View File

@ -587,8 +587,7 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled
else {
ActiveMQServerLogger.LOGGER.debug("Received invalid scaleDownTargetNodeID: " + scaleDownTargetNodeID);
//we never fail permanently here, this only happens once all reconnect tries have happened
fail(false);
fail(me.getType() == ActiveMQExceptionType.DISCONNECTED);
}
tryScheduleRetryReconnect(me.getType());

View File

@ -340,7 +340,9 @@ public class ClusterConnectionBridge extends BridgeImpl {
@Override
protected void tryScheduleRetryReconnect(final ActiveMQExceptionType type) {
scheduleRetryConnect();
if (type != ActiveMQExceptionType.DISCONNECTED) {
scheduleRetryConnect();
}
}
@Override

View File

@ -1428,7 +1428,9 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn
ActiveMQServerLogger.LOGGER.debug("Removing record for: " + targetNodeID);
MessageFlowRecord record = records.remove(targetNodeID);
try {
record.close();
if (record != null) {
record.close();
}
}
catch (Exception e) {
e.printStackTrace();