tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Apache Tomcat 5.0.28 Server/Intermittently Web Apps becomes Unresponsive
Date Wed, 01 Jan 2014 18:37:22 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Milan,

On 1/1/14, 4:05 AM, Milan wrote:
> Thanks : David Kerber and Chris
> 
> As you suggested that the issue is more likely belongs to database,
> you are right, I have checked in my oracle that is there been any
> blocking session are there? And guess what, I have found blocked
> session and when I kill them manually, the application execution
> resume.
> 
> Actually there is no hanging of tomcat service as such, because as
> I stated before, when I kill my blocking session, all again running
> fine.
> 
> Now what I was thinking is how to avoid that blocking session from
> my application code. Currently, what I have done in my servlet
> programming till date is as follows. 1) In doPost Method, I created
> or say get datasource object. 2) from doPost method I transfer my
> control to business logic method. 3) in my business logic method, I
> create connection object locally. In same method I create my
> statement object 3) then close them all at the end of business
> logic method.(Using finally block)
> 
> Now, Can you suggest me how I should use DBCP i.e. Creating
> DataSource Object, Connection Object, Statement object. Suggest me
> efficient way to use DBCP so that I can avoid blocking session in 
> my oracle

http://blog.christopherschultz.net/index.php/2009/03/16/properly-handling-pooled-jdbc-connections/

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJSxGBiAAoJEBzwKT+lPKRY66kQAKm1KeWm4Xa4hYP+1vd7Iamx
EfMH8Mvw68B5c4eE4EhI6b3fEuPcwUuCbLd7HJIpgX4Om62AMABIwOCDLPICuAVW
lwqpGMXSVIoxSJVeXgy01TQhpiDqpYFHEpFkn4I3ipGjJhhomLdIQQ9kZCcqQkVG
hmil6BQ6/FU9zo1+JvGpAr5fjelpKpTq6wd0JcX3WGRadqifH8DL7cVVcWrqTm+8
EDtucgQPoIgmBbwoJVQW6z0nnpyPQXSvzDwOsDD2CtSLd/keyDb39WpA7P3K8irL
IyuPN0ETBL4MNvwZVIf26zdoGOVIZMj3QfZ7KICKTQ66dSVnnyGISBftIX4abKK2
owbCRUESSbDwKCk1xtuWtTn9Mv8suno+13fg9J7adhm+n2133rp7YQkQkERSi9A9
/kr9DFNsFbNimD6RJe2G7NHs3Nxq5PQgfGpbVmCctBHq4ifez7CzTFkQRu82ZFNQ
uZl3n94Eg8/UHC0T9DeLizq99iUKvoJo0F9+h/nr1ozFOK1gRZvIidery22HYhCL
vFj5dcKQdXIXT+oKywAn7yaye73hUMeSBw3hC3JDZRX4UMJChmQ0N8+38xak+8b3
IydMHIARXqLQXiX78NOdKBg5715BrAvqbVaGLvbnlluYOCVALSkyxBk53Je0rrcN
Gub9pd8ZqGOI5gx+/R/Y
=ULyU
-----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