brusdev commented on a change in pull request #3813:
URL: https://github.com/apache/activemq-artemis/pull/3813#discussion_r735761283
##########
File path:
artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivation.java
##########
@@ -306,12 +306,19 @@ protected synchronized void setup() throws Exception {
Exception firstException = null;
+ ClientSessionFactory cf = null;
+
for (int i = 0; i < spec.getMaxSession(); i++) {
- ClientSessionFactory cf = null;
+ //if we are sharing the ceonnection only create 1
+ if (!spec.isSingleConnection()) {
+ cf = null;
+ }
ClientSession session = null;
try {
- cf = factory.getServerLocator().createSessionFactory();
+ if (cf == null) {
Review comment:
if spec.getMaxSession() > 1 and spec.isSingleConnection() == true and an
exception is raised cf is closed and not created again:
```
} catch (Exception e) {
if (cf != null) {
cf.close();
}
...
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]