db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guy Galil <guy_ga...@guardium.com>
Subject Re: Connection leak
Date Mon, 27 Sep 2004 15:04:55 GMT
This might be pointing to the obvious but still:
when you use Connection con = Torque.getConnection();
make sure you have a finally clause with Torque.closeConnection(con);

On Fri, 2004-09-24 at 16:06, Husek, Paul wrote:
> Hello,
> 
>  
> 
> I'm using Torque v3.1 with commons-dbcp connection pooling.  I'm getting
> what I believe is a connection leak.  After a certain time of my application
> being up and responsive it just hangs.
> 
>  
> 
> Is there anyway I can verify this?  E.g. Can I see how many connections are
> left in the pool, how many have been taken and not returned, etc? In some
> places I do a Torque.getConnection() but may not be returning them.  Can I
> cause them to be reaped automatically if I forget to return them?
> 
>  
> 
> 
> 
> Paul
> 
>  
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message