tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Mikusa <dmik...@vmware.com>
Subject Re: Resource management in new Tomcat JDBC connection pool.
Date Wed, 10 Apr 2013 20:17:38 GMT
On Apr 10, 2013, at 4:05 PM, Igor Urisman wrote:

> Hello,
> 
> The new Tomcat 7 JDBC
> pool<http://people.apache.org/~fhanik/jdbc-pool/jdbc-pool.html>is
> quite new and not much has been written on it yet.  

I'm not sure I would consider it new, it's been out three plus years and I know it's being
used in production environments.

As for articles, search for "jdbc" on www.tomcatexpert.com.  There are several articles.

> Has anyone looked it how well it manages underlying resources, both in java domain and
in the
> database?
> More specifically, what happens when I call Connection.close()
> without explicitly first closing statements and result sets that were
> created via this connection? An un-pooled raw JDBC connection will do the
> right thing and close underlying resource when closed.  But in a pool
> setup, connection close() simply returns it to the pool.

I think you're looking for the StatementFinalizer interceptor.

  https://tomcat.apache.org/tomcat-7.0-doc/jdbc-pool.html#org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer

> 
> In an ideal world, a pooled connection proxy will keep track of the
> underlying resources and release/close them when closed.  But that's known
> not to have been the case in the past and I didn't find any guarantees of
> that in the docs for the new pool.  I've been running some tests and I am
> coming up with surprises.  I don't want yet to post code to this list.
> Just a general inquiry for now.

It would help if you posted the code, configuration and software versions that you are using.
 As well as your expected and observed behaviors.  Given concrete, documented examples, someone
on this list should be able to answer your questions.

Dan


> 
> Thanks in advance,
> -Igor.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message