Commons Dbcp
  1. Commons Dbcp
  2. DBCP-387

Have abandoned connection call cancel and rollback so it doesn't have to wait before closing

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Won't Fix
    • Affects Version/s: 1.4
    • Fix Version/s: None
    • Labels:
    • Environment:

      Linux, Java 1.6

      Description

      When using BasicDataSource and enabling Abandoned the destroyObject will be called when a connection has been out of the pool longer than a set period of time.
      In testing I found that when a connection is reclaimed "destroyObject" is called. This call uses close to free up the connection. The problem is any activity on the connection will prevent the close from occuring.

      A suggestion is to cancel active statements and then close them. Then rollback the connection and close the connection.

      PoolableConnectionFactory

      public void destroyObject(Object obj) throws Exception {
      if(obj instanceof PoolableConnection)

      { ((PoolableConnection)obj).reallyClose(); }

      }

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Michael Kerr
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development