mirror of https://github.com/apache/activemq.git
https://issues.apache.org/jira/browse/AMQ-5710 - connection cleanup should not remove connection from the broker
This commit is contained in:
parent
25c99a6c36
commit
c705523cd0
|
@ -1587,19 +1587,13 @@ public class ActiveMQConnection implements Connection, TopicConnection, QueueCon
|
|||
c.dispose();
|
||||
}
|
||||
|
||||
if (isConnectionInfoSentToBroker) {
|
||||
if (!transportFailed.get() && !closing.get()) {
|
||||
syncSendPacket(info.createRemoveCommand());
|
||||
}
|
||||
isConnectionInfoSentToBroker = false;
|
||||
}
|
||||
if (userSpecifiedClientID) {
|
||||
info.setClientId(null);
|
||||
userSpecifiedClientID = false;
|
||||
}
|
||||
clientIDSet = false;
|
||||
|
||||
started.set(false);
|
||||
stop();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -234,7 +234,7 @@ public class ActiveMQManagedConnection implements ManagedConnection, ExceptionLi
|
|||
try {
|
||||
physicalConnection.cleanup();
|
||||
} catch (JMSException e) {
|
||||
throw new ResourceException("Could cleanup the ActiveMQ connection: " + e, e);
|
||||
throw new ResourceException("Could not cleanup the ActiveMQ connection: " + e, e);
|
||||
} finally {
|
||||
// defer transaction cleanup till after close so that close is aware of the current tx
|
||||
localAndXATransaction.cleanup();
|
||||
|
|
Loading…
Reference in New Issue