From jackrabbit-dev-return-4641-apmail-incubator-jackrabbit-dev-archive=www.apache.org@incubator.apache.org Wed Nov 30 16:54:37 2005 Return-Path: Delivered-To: apmail-incubator-jackrabbit-dev-archive@www.apache.org Received: (qmail 63580 invoked from network); 30 Nov 2005 16:54:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 30 Nov 2005 16:54:37 -0000 Received: (qmail 45568 invoked by uid 500); 30 Nov 2005 16:54:33 -0000 Mailing-List: contact jackrabbit-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jackrabbit-dev@incubator.apache.org Delivered-To: mailing list jackrabbit-dev@incubator.apache.org Received: (qmail 45557 invoked by uid 99); 30 Nov 2005 16:54:33 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Nov 2005 08:54:33 -0800 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: 193.19.192.5 is neither permitted nor denied by domain of the.mindstorm.mailinglist@gmail.com) Received: from [193.19.192.5] (HELO mail.evolva.ro) (193.19.192.5) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Nov 2005 08:56:00 -0800 Received: (qmail 20235 invoked by uid 1013); 30 Nov 2005 16:54:06 -0000 Received: from 86.55.40.139 by mail.evolva.ro (envelope-from , uid 89) with qmail-scanner-1.25 (clamdscan: 0.87.1/1167. Clear:RC:1(86.55.40.139):. Processed in 0.064453 secs); 30 Nov 2005 16:54:06 -0000 Received: from unknown (HELO ?192.168.62.51?) (alexandru.popescu@evolva.ro@86.55.40.139) by mail.evolva.ro with AES256-SHA encrypted SMTP; 30 Nov 2005 16:54:06 -0000 Message-ID: <438DD8F3.90405@gmail.com> Date: Wed, 30 Nov 2005 18:53:07 +0200 From: Alexandru Popescu User-Agent: Thunderbird 1.5 (Windows/20051025) MIME-Version: 1.0 To: jackrabbit-dev@incubator.apache.org Subject: Re: JCR and transactionability References: <438DB1FB.2090703@gmail.com> <66c10f230511300638l1d3c1ebv14f2d4382609a11@mail.gmail.com> In-Reply-To: <66c10f230511300638l1d3c1ebv14f2d4382609a11@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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/3= 0/2005 4:38 PM :# > Hi Alexandru, >=20 > 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. >=20 This sounds good, but than I am realizing Tomcat is not an application se= rver, so should I conclude=20 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. >=20 > Not all operations inside Jackrabbit are fully transactional, though, > such as versioning and locking, but should follow soon. >=20 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. >=20 I will definitely take a look at XATest, but don't know if it makes any s= ense after the remark that=20 Tomcat is not an application server and so it most probably doesn't have = a resource adapter=20 discovery mechanism. Did I get these wrongly? =2E/alex -- =2Ew( the_mindstorm )p. > Cheers > Dominique >=20 > On 11/30/05, Alexandru Popescu wr= ote: >> 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 r= equirements 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 con= fused=B4 transactional mind :-). >> >> The environment I am working on is a multi-repository under Tomcat. Th= e 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 a= ware 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 s= ometimes some of the nodes are >> already retrieved), I want to perform a set of modifications on the re= pository 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 reposit= ories. 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 >> >> >=20 >=20 >=20 >=20 > !DSPAM:438dbb12993781670220665! >=20 >=20