https://bz.apache.org/bugzilla/show_bug.cgi?id=69236

            Bug ID: 69236
           Summary: JDBC interceptor reset method oerdering
           Product: Tomcat Modules
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: jdbc-pool
          Assignee: dev@tomcat.apache.org
          Reporter: apache.absently...@simplelogin.com
  Target Milestone: ---

Hi,

While using multiple jdbc interceptors, we came across the following
behaviour/bug: 

the property jdbcInterceptors contains a list of semicolon separated class
names, and the reset method of those interceptors is initially called in
reverse order, then called in the order they are listed in the property. 

That caused a bug on our end, because the first interceptor was resetting the
thing that the second one did.

While the doc doesn't say anything about order, it would make a lot of sense to
have that order respected all the time, especially since it would be a small
change.

It's all in org.apache.tomcat.jdbc.pool.ConnectionPool.setupConnection: when a
connection is first borrowed, while the chain of interceptors is built, the
reset() method is called, but in reverse order. The following calls to borrow a
connection will use the previously built handler chain which follows the order
defined in the property.

I'd be happy to put in a PR, provided you agree to the change.

Cheers,
François

-- 
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