tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: [OT] ConnectionPool question
Date Sat, 07 Nov 2009 01:54:30 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Elli,

Okay, I think we've hijacked Josh's thread enough to at least mark it as
off topic. :)

On 11/5/2009 10:37 PM, Elli Albek wrote:
> Christopher Schultz wrote:
>> Pooled connections are almost certainly not behaving this way. This has
>> been discussed at least twice in the last week or two, and, I believe,
>> already once in this thread.
> 
> This is certainly not the case for my DBCP library (1.2.2). I just
> stepped through the source code: Calling connection.close() is closing
> result sets and statements.

I'm not sure how calling Connection.close (where the Connection object
is one from DBCP) would possibly be able to close ResultSet and
Statement objects created by the underlying connection.

Unless, I suppose, they decided to wrap /everything/ and register all
the ResultSet and Statement objects handed-out by the underlying
Connection for the purposes of (possibly) closing them later. I should
really read the source :)

> Below is the DBCP code that keeps track of open statements/result sets
> and closes them when the connection is closed (BDCP 1.2.2).

Yup: it looks like they do wrap/register everything and then close it
for you. It's nice that they followed the spec, here :)

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkr001YACgkQ9CaO5/Lv0PDKfgCgl0DRVzft7OkckYlzs4IsBcYu
wvsAoIRysepHLxAW7wBznL0vfaJhy/ll
=tTmF
-----END PGP SIGNATURE-----

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


Mime
View raw message