1

While creating a JdbcInterceptor for Tomcat jdbc-pool, one can override the method reset(ConnectionPool parent, PooledConnection con), which will called every time the connection is borrowed from the pool.

Is there a way to detect if this is the first time a particular underlying connection is being borrowed from the pool?

I could code something in my interceptor to "remember" and then check this each time, but I wonder if there is some type of property on the PooledConnection that I can check. I tried isInitialized(), but that is always true in the reset() method.

http://tomcat.apache.org/tomcat-7.0-doc/jdbc-pool.html#Interceptors

Darius X.
  • 2,886
  • 4
  • 24
  • 51

0 Answers0