mirror of https://github.com/apache/activemq.git
[AMQ-6068] make full cleanup of the rar managed connection conditional on a user specified client id being present
This commit is contained in:
parent
2b3f0e5958
commit
2bd3379932
|
@ -1555,6 +1555,10 @@ public class ActiveMQConnection implements Connection, TopicConnection, QueueCon
|
|||
doCleanup(false);
|
||||
}
|
||||
|
||||
public boolean isUserSpecifiedClientID() {
|
||||
return userSpecifiedClientID;
|
||||
}
|
||||
|
||||
public void doCleanup(boolean removeConnection) throws JMSException {
|
||||
if (advisoryConsumer != null && !isTransportFailed()) {
|
||||
advisoryConsumer.dispose();
|
||||
|
|
|
@ -232,7 +232,7 @@ public class ActiveMQManagedConnection implements ManagedConnection, ExceptionLi
|
|||
proxyConnections.clear();
|
||||
|
||||
try {
|
||||
physicalConnection.doCleanup(true);
|
||||
physicalConnection.doCleanup(physicalConnection.isUserSpecifiedClientID());
|
||||
} catch (JMSException e) {
|
||||
throw new ResourceException("Could not cleanup the ActiveMQ connection: " + e, e);
|
||||
} finally {
|
||||
|
|
Loading…
Reference in New Issue