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: Releasing DB connections
Date Fri, 27 Aug 2004 14:20:43 GMT
If you use Connection con = Torque.getConnection() to get the connection
then you should use Torque.closeConnection(con) to close it:

	try
	{
		Connection con = Torque.getConnection();
		/* use your connection here
		...
		...
		*/
	}
	finally
	{
		Torque.closeConnection(con);
	}

I don't think transactions has anything to do with this.


On Fri, 2004-08-27 at 04:21, Raphael.X.Mankin%GSK%SB@gsk.com wrote:
> A bit of clarification please.
> 
> One uses torque.getConnection to get a DB connection from the pool. How and
> when is it returned to the pool?
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
> 


---------------------------------------------------------------------
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