[ARTEMIS-220] Artemis RA does not close its connection factories when it is stopped.

in stop(), close the knowConnectionFactories before clearing the collection.

JIRA: https://issues.apache.org/jira/browse/ARTEMIS-220
This commit is contained in:
Jeff Mesnil 2015-09-08 16:46:57 +02:00 committed by Clebert Suconic
parent 20006b6e9d
commit c1aaa562c8
1 changed files with 3 additions and 0 deletions

View File

@ -275,6 +275,9 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
managedConnectionFactories.clear(); managedConnectionFactories.clear();
for (ActiveMQConnectionFactory knownConnectionFactory : knownConnectionFactories.values()) {
knownConnectionFactory.close();
}
knownConnectionFactories.clear(); knownConnectionFactories.clear();
if (defaultActiveMQConnectionFactory != null) { if (defaultActiveMQConnectionFactory != null) {