Subject Re: [Firebird-Java] Re: New code in CVS
Author David Jencks
On 2002.02.25 09:22:55 -0500 rrokytskyy wrote:
> > I began the transaction explicitly, and traced my error to the use
> > of Connection.rollback() instead FBLocalTransaction.rollback().
> >
> > Was hoping that the autocommit stuff for BLOBs would be ready
> > for testing soon :-) Can't wait to get the FBLocalTransaction thingy
> > out of my JDBC code.
>
> Are you working in non-managed case? If yes, than what prevents you
> to switch your code from auto-commit to non-autocommit and use
> explicit con.commit()/con.rollback() when you finished working with
> the database? I think that using the FBLocalTransaction is not the
> best way to control the JDBC transactions in the non-managed scenario.

If everything is working as it should, if you use LocalTransaction you can
leave autocommit true, and do
lt.begin()
your work
lt.commit()/rollback()
and transactions will work fine. If you don't use LocalTransaction you
have to set Autocommit = false since there is no way otherwise to tell when
you want your tx to begin. On the other hand, LocalTransaction is not part
of jdbc spec, and jdbc stuff is inconsistent with jca cci, so it's going to
remain non standard for quite a while.

david jencks
>
> Best regards,
> Roman Rokytskyy
>
>
>
> To unsubscribe from this group, send an email to:
> IB-Java-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
>
>