Thomas Klute wrote:
--------------------------------------------------------------
Second problem (castor-cvs-version):

Someone changed the file TransactionContextImpl.java in the cvs
(comment: Fixed Bug 1162: Castor should always set autoCommit to false)
by removing the "if ( ! _globalTx )" line (diff from 1.18 to 1.19 in cvs)

I did this change to fix a problem I had with Tyrex and
OraclePooledConnectionDataSource.

Ivailo Abadjiev entered a new Bugzilla entry for your case :
Bug 1175 You cannot set autocommit during a managed transaction!
http://bugzilla.exolab.org/show_bug.cgi?id=1175

As stated in my answer to Ivailo, I will rollback the change this
afternoon (european time) :

Ok, after reading the spec :
"Attempting to enable autoCommit by calling Connection.setAutoCommit()
with a value of true will throw an SQLException"
It seems that JBoss will also throw an exception when trying to
set autocommit to false.

But the spec also says :
"the Connection object that is returned by a DataSource when distributed
transactions are being done has autoCommit turned off by default."

=> Bug 1162 was probably not a Castor bug, but a Tyrex issue :
Connections returned from tyrex are set to autocommit false only
with XA Datasources, not with simple DataSources.

--
Mickael Guessant

----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev

Reply via email to