jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Pfister <dominique.pfis...@day.com>
Subject Re: JCR and transactionability
Date Wed, 30 Nov 2005 14:38:30 GMT
Hi Alexandru,

Usually, an application server "discovers" Jackrabbit's support for
transactions by having it deployed as a resource adapter, which is
also where the XAResource interface comes into play. The contrib/jca
subfolder contains code for turning Jackrabbit into a resource

Right now, Jackrabbit does not expose a "local" transaction interface
that could be used when operating on a single repository, but, of
course, you can always resort to the "global" transaction interface,
namely the XAResource.

Not all operations inside Jackrabbit are fully transactional, though,
such as versioning and locking, but should follow soon.

Inside the class org.apache.jackrabbit.core.XATest, some features of a
transactional repository exposing a XAResource are tested. This class
uses a simple UserTransaction implementation. Maybe, taking a look at
this code sheds some light.


On 11/30/05, Alexandru Popescu <the.mindstorm.mailinglist@gmail.com> wrote:
> Hi!
> I have been trying to understand the way I can use transactions inside my application.
> Unfortunately, so far I haven't been able to understand what are the requirements and
what is
> supposed to be done on my side to make it work.
> I will try to describe my usage scenario and what I would like to see happening, and
than hopefully
> somebody with more experience can shed some light on my `dazed and confusedĀ“ transactional
mind :-).
> The environment I am working on is a multi-repository under Tomcat. The general question
would be:
> a/ do I need to use a 3rd party transaction provider (like JOTM)?
> b/ if a 3rd party transaction provider is involved how can I make it aware of the jackrabbit?
(or it
> should be the other way around?)
> 1/ scenario 1: single repository scenario
> Inside a code fragment, where I already have opened the Session (and sometimes some of
the nodes are
> already retrieved), I want to perform a set of modifications on the repository nodes
in a
> transactional mode.
> - is it possible to use a UserTransaction to demarcate the transaction? what are the
> 2/ scenario 2: multiple repository scenario
> Same as above, but the modifications are performed in multiple repositories. Is it needed
to use in
> this case a XAResource?
> Sorry if some of the above sound stupid, but right I am really really confused. Please
help me pass
> over this confusion moment.
> thanks a lot in advance,
> ./alex
> --
> .w( the_mindstorm )p.
> ps: I have read a few times the spec fragment regarding transactions. I have also searched
> mailing list and even if I have been able to find some related threads, these unfortunately
> get more confused. thanks again

View raw message