db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Fischer <Fisc...@seitenbau.net>
Subject Re: Releasing DB connections
Date Fri, 27 Aug 2004 10:11:40 GMT




Hi,

I have no idea whether you can do any tricks to use a connection for more
than one transaction, but I do not see why you should want to (except you
want to save work for the pool) ?

If you do not have any strong reason for not using the Transaction object
for getting/releasing your connection, I would recommend to use
Transaction; seems to be the standard way to me.
But perhaps someone else has a better idea.

      Thomas


raphael.x.mankin@gsk.com schrieb am 27.08.2004 12:00:39:

> So you are saying that one cannot do more than one transaction with a
> connection. Surely commit/rollback is a separate matter from saying, 'I
> have finished with this connections, now let someone else use it'?
>
>
> Of course, I can close the connection, which will force the pool manager
to
> create a new one, but that is not what I am after.
>
>
> Hi,
>
> personally I use Transaction.begin() to get a connection and
> Transaction.commit(connection) , transaction.rollback(connection) or
> transaction.safeRollback(connection) to give it back to the pool.
>
>    Thomas
>
> raphael.x.mankin@gsk.com schrieb am 27.08.2004 10:21:11:
>
> > 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
>
>
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> 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