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: Auto Commit + Transaction Problems
Date Tue, 21 Dec 2004 08:35:28 GMT




Hi,

Some pools can test connections before they give it to the end user (in
this case Torque). This is done by executing a simple query like "select
sysdate from dual". If the connections are not auto commit, this is the
first query in the transaction, and it is not possible to use any "set
transaction..." commands afterwards.

do you only use the methods (save()...)without connection, or do you also
use methods that need a connection (save(connection)...) or custom queries
?
What Pool are you using (see your runtime configuration) ?

   Thomas

zamangoer@gistec-online.de schrieb am 20.12.2004 23:18:34:

> Hi,
>
> in my code i never use a commit/rollback. If I'm not mistaken Torque
makes
> a commit/rollback internally when method save() is called???? Can you
> explain a little bit more what you mean with testOnBorrow??
>
> Ferruh
>
> >
> > Hi,
> >
> > One reason could be that you do not commit /rollback a connection
before
> > giving it back to the pool, and the pool does not do a commit/rollback,
> > and
> > you fetch the connection again and the pool tries to set transaction
> > isolation or something similar.
> > Another reason might be that are you explicitly using any "set
Transaction
> > ..." statement, and it is not the first statement in the transaction.
This
> > can happen e.g. if you use testOnBorrow = true.
> >
> >    Thomas
> >
> > "Ferruh Zamangoer" <ferruh.zamangoer@gistec-online.de> schrieb am
> > 20.12.2004 18:31:12:
> >
> >> Hi NG,
> >>
> >> is there any way in Torque to turn on auto commit? We have the problem
> > that
> >> we become the following Exception, when we want to insert a dataset
into
> > the
> >> database.
> >>
> >> java.sql.SQLException: ORA-01453: SET TRANSACTION muss erste Anweisung
> > der
> >> Transaktion sein
> ..


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