2 Replies Latest reply on Jul 8, 2008 8:58 AM by Mark Little

    Does suspended Tx release resources?

    Brice Ruth Novice

      If a transaction participant is using an Oracle, DB2, etc. connection from a connection pool, does suspending the Tx release those resources back to the pool, or is that provider dependent?

        • 1. Re: Does suspended Tx release resources?
          Michael Musgrove Master

          I had a look at the source code (in TxConnectionManager) and as far as I can tell the behaviour is as follows, the connection is released back into the pool:

          - if all users of the connection have called close on the connection and the property <track-connection-by-tx> is set to false (if the property is true the connection is held until the tx terminates)
          - the transaction has terminated (including any synchronisations)
          - a connection error occurred

          So it seems the answer to your question is no, merely suspending the tx does not release the connection. But, if you suspend the transaction and close the connection and the property <track-connection-by-tx> is false then the connection will be released.

          • 2. Re: Does suspended Tx release resources?
            Mark Little Master

            Suspend *only* works on the thread-to-transaction association. It has no other impact.