tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: tomcat session is not releasing
Date Thu, 02 Jul 2009 14:37:01 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Pid,

On 7/2/2009 5:44 AM, Pid wrote:
> On 2/7/09 06:50, jayesh.m@BIRLASOFT.COM wrote:
>> 2) During the Deployment we need to stop and start the TOMCAT server
>> lots of times. Afte
>> r successful deployment when we monitor our database we found that
>> hundreds of J
>> DBC sessions are connected with oracle with different log-on time.
> 
> So you don't mean Tomcat user sessions, do you mean JDBC Connections?
> 
> Are you properly closing the connection each time you use one?  It
> sounds like you aren't.

+1

Depending on the database, statements and cursors might not be released,
even after client termination.

Try reading http://blog.christopherschultz.net/?p=68 for some hints for
coding against a database connection pool (or really any JDBC
programming, really). You'd be surprised at how big an impact a missing
Statement.close() can have on your RDBMS.

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

iEYEARECAAYFAkpMxg0ACgkQ9CaO5/Lv0PAlugCeK7zZgwJ1cYEXlNrM9d+pHzCm
9VIAniVbfh0UL+6sEcxeMtBMCnY9UQez
=P1Lf
-----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