hi remy,
It does look like some DB's would start in auto-commit true .
I heard from somebody that even oracle does not allow setAutoCommit(false)
when dealing with a global trabsaction though i have not tested it yet.I
will do some testing with oracle database and let you know the result.
I think setAutoCommit(false) can be in seperate try catch block and any
expection ignored if there is no possibility
of SQLException being raised because of other problem or may be the
setAutoCommit(false) can be removed all together if the behavior is the same
for all the databases.
thanks,
rajkumar
-----Original Message-----
From: Remy Maucherat [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 10, 2001 10:29 AM
To: [EMAIL PROTECTED]
Subject: Re: Enlist error when using JDBCDescriptor store for Sybase
> hi dirk,
> I did some debugging on this problem.I found the exception occurs at
> public void start(Xid xid, int flags) method when the
> connection.setAutoCommit(false) is called in the JDBCDescriptorStore class
.
> An SQLException is raised with the error message set Update command is
not
> allowed
> in a multi-statement transaction .It looks like the setAutoCommit(false)
> should not be called
> explicitly by the programmer when dealing with a global transaction
> managed by an external
> transcation manager as it is implicitly set to false by the DataSource
> before returning the connection object.
> I commented out the setAutoCommit(false) part in the start method of the
> JDBCDescriptorStore and the base data was loaded successfully.
Good.
Am I right to assume that some DBs would start in auto-commit true ?
Maybe we can isolate the call to setAutoCommit(false) in a separate
try/catch, and ignore an exception being thrown there ?
Remy