https://issues.apache.org/bugzilla/show_bug.cgi?id=52002
             Bug #: 52002
           Summary: Pool re-opens and re-issues closed connection
           Product: Tomcat Modules
           Version: unspecified
          Platform: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: jdbc-pool
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: kevin.grei...@compsol.cc
    Classification: Unclassified


Created attachment 27751
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=27751
Patch to create new test case and fix to make it work

Closing a connection returns the connection to the pool but does not clear its
handler (the JDBC interceptor chain).  As a result, the next request for a
connection may re-open and return the old handler.

This behavior breaks multi-threaded code which closes a connection twice.  The
exact behavior being that thread 1 closes a connection, thread 2 opens a new
connection and gets the exact same connection object as thread 1, thread 1 then
closes is connection a second time thereby breaking thread 2.

I'm attaching a patch with a new test case which fails against the current
revision as well as a fix for ConnectionPool.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to