BTM
  1. BTM
  2. BTM-14

Need the ability to have BTM invoke specific methods on JDBC connection upon return to the pool

    Details

    • Type: New Feature New Feature
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.2
    • Fix Version/s: 1.3
    • Labels:
      None
    • Environment:
      JDK 1.5, Spring 2.5, Hibernate 3.2, Sybase JConnect 6.0, Sybase ASE 12.5
    • Number of attachments :
      0

      Description

      I am receiving warning messages from the JDBC Layer upon returning the connection to the pool. Upon researching the issue I found the following:

      -------------------------------------------------------
      This warning is raised by ASE server each time the connection asks for a global transaction.
      For a XAConnectionPool, all the transactions are globals (with two phase commit) so there is not risk to rollback a local one. You can ignore it.

      For persistant connection (like in ConnectionPool), I advise you to add the following instruction : "conn.clearWarnings();" just after "Connection conn = sybDs.getConnection();" in order to limit the warning buffer size and protect you from what could look like a memory leak.
      -------------------------------------------------------

      I need the ability to tell BTM to invoke "conn.clearWarnings()" when the connection is either returned to the pool or prior to handing it out.

        Activity

        Hide
        Ludovic Orban added a comment -

        I'm not sure it worth creating a generic method invoker, but clearWarnings() should definitely be called when the connection returns to the pool.

        I'll add a static call to clearWarnings() which should be good enough for now. Let's wait and see if there really is a need to call other methods when a connection is dequeued or requeued. If that's the case, I'll add such feature.

        Show
        Ludovic Orban added a comment - I'm not sure it worth creating a generic method invoker, but clearWarnings() should definitely be called when the connection returns to the pool. I'll add a static call to clearWarnings() which should be good enough for now. Let's wait and see if there really is a need to call other methods when a connection is dequeued or requeued. If that's the case, I'll add such feature.
        Hide
        Ludovic Orban added a comment -
        Show
        Ludovic Orban added a comment - Implemented in trunk, snapshot published: http://snapshots.repository.codehaus.org/org/codehaus/btm/btm/1.3-beta2-20080423/

          People

          • Assignee:
            Ludovic Orban
            Reporter:
            Chris Mathrusse
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: