[Mulgara-dev] Transaction control via Connection API

Paul Gearon gearon at ieee.org
Mon May 5 18:52:18 UTC 2008


Hi Alex,

On Mon, May 5, 2008 at 12:17 PM, Alex Hall <alexhall at revelytix.com> wrote:
> I'm using the Connection API as my client interface to Mulgara.  I see
>  that the Connection interface exposes the setAutoCommit method from the
>  Session interface, but I would like to do have more detailed transaction
>  control.  Are there any arguments against grabbing the Session object
>  from the Connection and using the commit and rollback methods directly?
>   Any caveats I should be aware of should I choose to do this?

Not really.  Connections are an abstraction on Session to allow for a
few non-session related activities, and also to allow for some future
non-RMI work without having to worry about how to access a Session
remotely.

Pretty much all server-related calls to a Connection are passed
directly into the wrapped Session.

>  Also, could you please verify that my understanding of the semantics of
>  the transaction control methods from the Session interface is correct:

Your description looks pretty much right to me, but I'm going to defer
to Andrae since he re-wrote this to work with the JTA. Speaking of
which.... Andrae, should we put access to the JTA into the Connection
interface? If so, then it would be good to do this before I get the
chance to properly document the interface (which will hopefully be
soon).

Regards,
Paul Gearon



More information about the Mulgara-dev mailing list