-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: How to dectect jdbc connection leak?
PostPosted: Wed Jul 05, 2006 10:14 pm 
Newbie

Joined: Fri Feb 17, 2006 12:18 am
Posts: 11
hi, i'm using Hibernate 3.1 and i want to check if my web app has connection leak so i set

log4j.logger.org.hibernate.transaction=debug, stdout
log4j.logger.org.hibernate.jdbc=debug, stdout

and hibernate output:

10:11:22,390 DEBUG ConnectionManager:398 - aggressively releasing JDBC connectio
n
10:11:22,390 DEBUG ConnectionManager:398 - aggressively releasing JDBC connectio
n

...

10:11:22,390 DEBUG ConnectionManager:369 - connection already null in cleanup :
no action
10:11:22,390 DEBUG ConnectionManager:369 - connection already null in cleanup :
no action

Is these log correct? and what is "aggressively releasing" means? thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 06, 2006 5:39 am 
Expert
Expert

Joined: Tue Dec 28, 2004 7:02 am
Posts: 573
Location: Toulouse, France
Why are you trying to do that by yourself ? It's the work of a connection pool.

To do, I'd try to send a query to the db surrounded by a "try catch", if I receive an error, I'd dismiss the connection.

But as I said, this is typically the kind of work a pool connection is designed for. For example, you usually define sql queries that have no impact in perfs and lets you test that the db answers correctly (on oracle, for example, "select * from dual"). Then the pool sends this query regularly to the db into each connection to test.

_________________
Baptiste
PS : please don't forget to give credits below if you found this answer useful :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.