6 Replies Latest reply on Jun 3, 2019 7:54 AM by ochaloup

    ConnectionManager leak?

    arielcarrera

      Hi, I followed one of the demos of hibernate and I made a small test project with some integration tests using one of the ConnectionManager that are distributed in narayana-jta-5.9.5.Final.jar

       

      Apparently after running all my tests, there would be a leak with the connection pool and reaches the maximum of 10connections.
      I had to set the maximum number temporarily to 20.

       

      However, I am interested in knowing the cause, although it is possible to have some error in the transaction handling, what surprises me is that in the class com.arjuna.ats.internal.jdbc.ConnectionManager in the line 111 has:

                          } else {
                              // no longer being used by a transaction, so let's discard. JBTM-764
                              //
                              // ALL
                              //
                              // if (tx1 == null)
                              // iterator.remove ();
                          }

      What gives me to think that the problem can be directly in this class that is not releasing the connections...

       

      I looked at the issue and it's really old. I imagine that this ConnectionManager is not the usual one to use, and the configuration proposed in the examples of hibernate for testing is not the best, however this class is included in the distribution of narayana as well.