Re: Behavior of Connection.commit()
Joe Weinstein wrote:
Surely the driver can do "set implicit_transactions on" instead of
that. My old driver from '96 does this:
setAutoCommit(true): "if (@@trancount > 0) rollback transaction set
implicit_transactions off"
setAutoCommit(false): "if (@@trancount > 0) rollback transaction set
implicit_transactions on"
Joe Weinstein at BEA Systems
And just to be clear, we consciously chose to roll back any tx context that
was not explicitly committed before a call to setAutoCommit(true). Some
folks are used to Oracle's SQL-PLUS application committing on close, so
you *could* have a connection configuration option to go the other way,
but *boy* is that odd/ugly as desired behavior.
For both polarities of the call, we do *not* send duplicate/redundant
calls. The driver keeps a flag of the setting it's supposed to be
manifesting, so whenever the user calls setAutoCommit() asking for the
same mode we're already in, we do nothing.
Joe
.