Return-Path: Delivered-To: apmail-incubator-jackrabbit-dev-archive@www.apache.org Received: (qmail 94120 invoked from network); 21 Oct 2004 17:49:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 21 Oct 2004 17:49:04 -0000 Received: (qmail 5184 invoked by uid 500); 21 Oct 2004 17:49:03 -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 5163 invoked by uid 99); 21 Oct 2004 17:49:02 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of stefan.guggisberg@gmail.com designates 64.233.170.202 as permitted sender) Received: from [64.233.170.202] (HELO rproxy.gmail.com) (64.233.170.202) by apache.org (qpsmtpd/0.28) with ESMTP; Thu, 21 Oct 2004 10:49:02 -0700 Received: by rproxy.gmail.com with SMTP id 74so50637rnk for ; Thu, 21 Oct 2004 10:49:01 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding; b=tJaHC67bIiwdsbwxQlVTLgT9q25oSAfpzQNT552QfKjwGnFVvtJWiMhS7iwydK09+/1Tv1xRRqgGCgSA1Ip4MT3u1ODbLRBaQ4Ip2D1V4hquhLI+YWyVwO5At8xabsTRpaZrmwdcvpv7zwRmDC1NJCht5FeT66FfSwaMZUfPkCE= Received: by 10.38.22.51 with SMTP id 51mr3226276rnv; Thu, 21 Oct 2004 10:49:00 -0700 (PDT) Received: by 10.38.152.64 with HTTP; Thu, 21 Oct 2004 10:49:00 -0700 (PDT) Message-ID: <90a8d1c004102110494839cdaf@mail.gmail.com> Date: Thu, 21 Oct 2004 19:49:00 +0200 From: Stefan Guggisberg Reply-To: Stefan Guggisberg To: jackrabbit-dev@incubator.apache.org Subject: JTA support Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N folks, as you might have noticed i have just committed a large chunk of code. this is the first implementation of transaction support (JTA) in jackrabbit! the code has been contributed by dominique pfister and i think he has done a great job :) dominique is lurking in the jackrabbit-dev list and i'm sure that he'll be happy to answer all tx related questions that might come up. jta support is exposed via the XASession, i.e. Repository.login() returns a XASession instance instead of the regular Session. if you want to get your hands dirty and test the tx support, you can use code like this: Credentials creds = new SimpleCredentials("anonymous", "".toCharArray()); XASession session = (XASession) r.login(creds, null); // get XAResource XAResource xares = session.getXAResource(); // create dummy Xid Xid xid = new Xid() { public byte[] getBranchQualifier() { return new byte[0]; } public int getFormatId() { return 0; } public byte[] getGlobalTransactionId() { return new byte[0]; } }; xares.start(xid, XAResource.TMNOFLAGS); // .... add new nodes & properties and save them xares.end(xid, XAResource.TMSUCCESS); xares.prepare(xid); xares.commit(xid, false); cheers stefan