On 19/11/2013 13:32, Carl Boberg wrote:

> I have here an example of the way we close from the application, (the devs
> have named it dispose). From my untrained non java dev eye we do not seem
> to be doing statement.Close(); and Im curious if that might be the issue?
> If so, why does DBCP handle it nicely and not JDBC?

Commons DBCP tracks Statements and ResultSets when they are created and
closes the associated Statements and ResultSets when the connection that
created them is returned to the pool.

Tomcat's JDBC pool does not do this. This is one of the reasons that
Commons DBCP has a larger code base.

As an aside, DBCP 2 is getting close to a first release. It has all the
features of DBCP and nearly all of the speed in highly concurrent
environments of Tomcat's JDBC pool. Snapshots are available if you want
to test it. Alternatively, you can use a Tomcat 8 RC as Tomcat 8 uses
DBCP2 rather than DBCP as the default database connection pooling.

Mark

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

Reply via email to