jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting" <jukka.zitt...@gmail.com>
Subject Re: Transactions in jackrabbit using RMI?
Date Wed, 30 May 2007 11:42:15 GMT

On 5/30/07, (Berry) A.W. van Halderen <b.vanhalderen@hippo.nl> wrote:
> On Wed, May 30, 2007 at 01:17:29PM +0300, Jukka Zitting wrote:
> > Unfortunately no. The RMI layer currently doesn't support transactions.
> >
> > Please file a feature request in Jira for that. Any contributions to
> > implement transactions using RMI would also be welcome. :-)
> For an evaluation of JackRabbit we needed to create a test and setup
> where JCR operations where performed over RMI while having a transactional
> session.  Unless I've overlooked some issue I had implemented just this
> quite easily.
> I think the only thing that needed to be implemented is to extend both
> client and server side decorator stubs to implement the XAResource
> interface.  The client, when asked for the getXAResource() can just return
> itself.  In the implementation of the XAResource interface the client stub
> can just call the server side stub over RMI.  The server side stub just
> forwards the call to the actual session.
> This works because the transaction IDs (Xid) are serializable, and can
> be passed over RMI.  The transactions themselves are managed at the
> client side.
> This seems to work fine (commit, rollback, etcetera).  Am I missing something,
> otherwise I'll extract the code for this and post it on the Jira issue.

That should be all that's needed. Your contribution would be very much
welcome. :-)


Jukka Zitting

View raw message