Subject Re: [Firebird-Java] Turning off auto-commit on xa-transactions in JBOSS
Author David Jencks
If you use xa transactions I would advise you to use UserTransaction in
a BMT scenario.

The J2CA requirements translated to the jdbc interfaces, to which I
presume JBoss still adheres since they claim certification, are that
inside a JTA transaction whether bean or container managed you cannot
call commit, rollback, or setAutoCommit on the connection. Outside a
JTA transaction you should be able to call setAutoCommit and after you
turn it off call commit or rollback on the connection. If you are
doing this I would have to question why you think you need xa
transactions.

Whatever is reported as the autocommit value inside a JTA transaction
-- it should be false -- no work will be committed or rolled back until
the JTA transaction completes.

david jencks

On Apr 4, 2005, at 3:40 PM, paulbramble wrote:

>
>
> We're newbies, and trying to use firebird with JBoss.  We are using
> XA-
> Transactions, in connection-factories so we can get connection
> pooling.  I'm using jdbc to access the database, and I need to provide
> transaction support.  Standard commits and rollbacks don't work, i
> keep getting a "No local transaction active: can't commit" exception.
>
> I tried to disable auto-commits, but I am unable to do so, apparently
> JBOSS is setting auto-commit on in such a fashion that prevents me
> from disabling it later. 
>
> Is there a way to disable autocommit in this scenario? 
>
> Thanks,
>
> Paul B.
>
>
>
>
>
>
>
>
> Yahoo! Groups Links
>
> • To visit your group on the web, go to:
> http://groups.yahoo.com/group/Firebird-Java/
>  
> • To unsubscribe from this group, send an email to:
> Firebird-Java-unsubscribe@yahoogroups.com
>  
> • Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service.
>
>