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();
|
c.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isConnectionInfoSentToBroker) {
|
|
||||||
if (!transportFailed.get() && !closing.get()) {
|
|
||||||
syncSendPacket(info.createRemoveCommand());
|
|
||||||
}
|
|
||||||
isConnectionInfoSentToBroker = false;
|
|
||||||
}
|
|
||||||
if (userSpecifiedClientID) {
|
if (userSpecifiedClientID) {
|
||||||
info.setClientId(null);
|
info.setClientId(null);
|
||||||
userSpecifiedClientID = false;
|
userSpecifiedClientID = false;
|
||||||
}
|
}
|
||||||
clientIDSet = false;
|
clientIDSet = false;
|
||||||
|
|
||||||
started.set(false);
|
stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -234,7 +234,7 @@ public class ActiveMQManagedConnection implements ManagedConnection, ExceptionLi
|
||||||
try {
|
try {
|
||||||
physicalConnection.cleanup();
|
physicalConnection.cleanup();
|
||||||
} catch (JMSException e) {
|
} 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 {
|
} finally {
|
||||||
// defer transaction cleanup till after close so that close is aware of the current tx
|
// defer transaction cleanup till after close so that close is aware of the current tx
|
||||||
localAndXATransaction.cleanup();
|
localAndXATransaction.cleanup();
|
||||||
|
|
Loading…
Reference in New Issue