This is an automated email from the ASF dual-hosted git repository.
brusdev pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
The following commit(s) were added to refs/heads/main by this push:
new fe5afc1d69 ARTEMIS-4577 Send CONNECTION_CLOSED event after deleting
temporary resources
fe5afc1d69 is described below
commit fe5afc1d69416065defa6df1c20c2a5bb0f89469
Author: Domenico Francesco Bruscino <[email protected]>
AuthorDate: Thu Jan 18 14:50:01 2024 +0100
ARTEMIS-4577 Send CONNECTION_CLOSED event after deleting temporary resources
---
.../artemis/ra/ActiveMQRASessionFactoryImpl.java | 24 +++++++++++-----------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git
a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRASessionFactoryImpl.java
b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRASessionFactoryImpl.java
index 49e30540fe..e15cf090ab 100644
---
a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRASessionFactoryImpl.java
+++
b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRASessionFactoryImpl.java
@@ -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();
+ }
+ }
}
/**