Thanks a lot Dominique for the hints. I still have some comments:
#: Dominique Pfister changed the world a bit at a time by saying on 11/30/2005
4:38 PM :#
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
adapter.
This sounds good, but than I am realizing Tomcat is not an application server, so should I conclude
that I cannot use transactions?
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.
I will keep this in mind.
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.
I will definitely take a look at XATest, but don't know if it makes any sense after the remark that
Tomcat is not an application server and so it most probably doesn't have a resource adapter
discovery mechanism.
Did I get these wrongly?
./alex
--
.w( the_mindstorm )p.
Cheers
Dominique
On 11/30/05, Alexandru Popescu <[EMAIL PROTECTED]> 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 limitations?
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 the
mailing list and even if I have been able to find some related threads, these
unfortunately helped
get more confused. thanks again
!DSPAM:438dbb12993781670220665!