Uploaded image for project: 'JBoss Transaction Manager'
  1. JBoss Transaction Manager
  2. JBTM-532

Connection leak if the DBMS is not mapped into the ModifierFactory or if the DBMS does not support multiple connections

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Done
    • Affects Version/s: 4.5.0, 4.6.0
    • Fix Version/s: 4.8.0
    • Component/s: JTA
    • Labels:
      None
    • Environment:

      Spring + JBossJTA

      Description

      When a close() is issued on a ConnectionImple() before transaction termination (and this can happen because of Spring JTA infrastructure calling org.springframework.jdbc.datasource.DataSourceUtils.ConnectionSynchronization.beforeCompletion()) and either:

      • the ModifierFactory has no information about the DBMS in use (PostgreSQL, for instance...)
        or
      • the modifier for the DBMS says that it does not support multiple connections in a single transaction

      then, the synchronization that should close the connection after transaction completion is not registered and the connection is lost!

      This is at lines 349-359 of com.arjuna.ats.internal.jdbc.ConnectionImple in JBossTS 4.5.0 GA codebase.

      IMHO, the synchronization should always be registered unless we are sure that multiple connections in a single transaction are not supported. I have no idea of what should happen in the latter case...

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  marklittle Mark Little
                  Reporter:
                  mauromol Mauro Molinari
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: