ARTEMIS-4577 Send CONNECTION_CLOSED event after deleting temporary resources

This commit is contained in:
Domenico Francesco Bruscino 2024-01-18 14:50:01 +01:00 committed by Bruscino Domenico Francesco
parent eb7d131a8b
commit fe5afc1d69
1 changed files with 12 additions and 12 deletions

View File

@ -586,18 +586,6 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
closed = true;
synchronized (sessions) {
for (Iterator<ActiveMQRASession> i = sessions.iterator(); i.hasNext(); ) {
ActiveMQRASession session = i.next();
try {
session.closeSession();
} catch (Throwable t) {
logger.trace("Error closing session", t);
}
i.remove();
}
}
synchronized (tempQueues) {
for (Iterator<TemporaryQueue> i = tempQueues.iterator(); i.hasNext(); ) {
TemporaryQueue temp = i.next();
@ -623,6 +611,18 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
i.remove();
}
}
synchronized (sessions) {
for (Iterator<ActiveMQRASession> i = sessions.iterator(); i.hasNext(); ) {
ActiveMQRASession session = i.next();
try {
session.closeSession();
} catch (Throwable t) {
logger.trace("Error closing session", t);
}
i.remove();
}
}
}
/**