[JDBC] autocommit -- rollback on statement close

Valentin Todorov (SEA) Valentin.Todorov at sea.ericsson.se
Thu Jul 20 09:31:16 EDT 2000

Yes, I had the problem a couple of months ago (posting from 20.4.00, "Problem with JDBC commit()") and changed the application code accordingly. Fortunately this was not that complicated. 
Not only Weblogic driver, but neither of these that I tested does it that way. I do not see any reason to bound the transaction processing to a Statement object.


Valentin Todorov
Ericsson Austria AG
Pottendorferstrasse 25-27
A-1121 Vienna
email: mailto:valentin.todorov at sea.ericsson.se
Telefon: +43 1 811 00 5569
Telefax: +43 1 81100 11 5569

> -----Original Message-----
> From: Jonathan Carlson [mailto:jcarlson at is.com]
> Sent: Wednesday, July 19, 2000 5:46 PM
> To: TDS Development Group
> Subject: [freetds] [JDBC] autocommit -- rollback on statement close
> I searched the archive for autocommit and didn't see anything 
> similar to 
> this.  I am using the latest build of the JDBC driver.
> In my application I turn off autocommit so that I can group 
> updates into a 
> single transaction.  However, It appears that with this option, when 
> closing a statement, the transaction is automatically rolled 
> back.  The 
> Weblogic SQLServer JDBC driver that I have used doesn't do this.
> rollback/commit is defined in the JDBC API as a connection 
> behavior instead 
> of a statement behavior.  Is it appropriate to rollback on a 
> statement 
> close?
> I've changed my application code so I reuse statements 
> instead of closing 
> them, but I'm still curious about this.
> Jonathan Carlson
> Software Developer
> Minneapolis, Minnesota
> ---
> You are currently subscribed to freetds as: 
> valentin.todorov at sea.ericsson.se
> To unsubscribe, forward this message to 
> $subst('Email.Unsub')

More information about the FreeTDS mailing list