[ 
https://issues.apache.org/jira/browse/ARTEMIS-3539?focusedWorklogId=669639&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-669639
 ]

ASF GitHub Bot logged work on ARTEMIS-3539:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 25/Oct/21 16:19
            Start Date: 25/Oct/21 16:19
    Worklog Time Spent: 10m 
      Work Description: 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]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 669639)
    Time Spent: 20m  (was: 10m)

> Allow a shared single connection in the Resource Adaptor
> --------------------------------------------------------
>
>                 Key: ARTEMIS-3539
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-3539
>             Project: ActiveMQ Artemis
>          Issue Type: Improvement
>          Components: Broker
>            Reporter: Andy Taylor
>            Assignee: Andy Taylor
>            Priority: Major
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> currently there is a 1 to 1 session with connection and session for MDB's, 
> allow the use of a single connection.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to