Return-Path: X-Original-To: apmail-jackrabbit-users-archive@minotaur.apache.org Delivered-To: apmail-jackrabbit-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2B4BCF1D4 for ; Mon, 25 Mar 2013 07:01:53 +0000 (UTC) Received: (qmail 64677 invoked by uid 500); 25 Mar 2013 07:01:52 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 64363 invoked by uid 500); 25 Mar 2013 07:01:50 -0000 Mailing-List: contact users-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@jackrabbit.apache.org Delivered-To: mailing list users@jackrabbit.apache.org Received: (qmail 64335 invoked by uid 99); 25 Mar 2013 07:01:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Mar 2013 07:01:49 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [194.8.61.8] (HELO spamslammer2.tirol.gv.at) (194.8.61.8) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Mar 2013 07:01:44 +0000 From: =?iso-8859-1?Q?K=D6LL_Claus?= To: "users@jackrabbit.apache.org" Date: Mon, 25 Mar 2013 08:01:05 +0100 Subject: AW: using javax.transaction.UserTransaction with JackRabbit 2.4.3 Thread-Topic: using javax.transaction.UserTransaction with JackRabbit 2.4.3 Thread-Index: Ac4eYqia896TDRR6SEy0+s65vH2wqQKwxv3Q Message-ID: <89934884426A01458CBE55947B042D7224A6E63765@EXCHMCA.tirol.local> References: In-Reply-To: Accept-Language: de-DE, en-US Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: de-DE, en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org Hi Ferdinant, Jackrabbit itself is the XA Resource so therefore you must not use a dataso= urce witch is managed by the container. Can you attach your config file ? greets claus -----Urspr=FCngliche Nachricht----- Von: Malzer Ferdinand OSP sIT [mailto:Ferdinand.Malzer@s-itsolutions.at]=20 Gesendet: Montag, 11. M=E4rz 2013 15:34 An: users@jackrabbit.apache.org Betreff: using javax.transaction.UserTransaction with JackRabbit 2.4.3 Hello, In JackRabbit the query of Repository.OPTION_TRANSACTIONS_SUPPORTED return = true. Therefore we want to use javax.transaction.UserTransaction with JackRabbit. What we want to do is shown in the following simplified pseude-code: Session session =3D null; Transaction tx =3D null; try { session =3D login(...); tx =3D new Transaction(); tx.begin(); //delete resources persisted in another TX datasource cleanOtherDBResources(); //delete a node persisted in JackRabbit Node node =3D session.getNode(path); node.remove(); session.save(); tx.commit(); } catch (Exception e) { if (tx !=3D null) { tx.softRollback();} } finally { if (session !=3D null) { session.logout();} } when we use a non XA-datasource for the JackRabbit PersistenceManager we g= et the following exception: Caused by: java.sql.SQLException: Connection has already been created in th= is tx context for pool named cmspool. Illegal attempt to create connection = from another pool: jackrabbitpool at weblogic.jdbc.jts.Driver.getExistingConnection(Driver.java:608) at weblogic.jdbc.jts.Driver.connect(Driver.java:127) at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDat= aSource.java:339) at org.apache.jackrabbit.core.util.db.ConnectionHelper.getConnectio= n(ConnectionHelper.java:436) at org.apache.jackrabbit.core.util.db.ConnectionHelper.startBatch(C= onnectionHelper.java:239) at org.apache.jackrabbit.core.journal.DatabaseJournal.startBatch(Da= tabaseJournal.java:506) at org.apache.jackrabbit.core.journal.DatabaseJournal.doLock(Databa= seJournal.java:474) when we use a XA-datasource for the JackRabbit PersistenceManager we get th= e following exception: Caused by: java.sql.SQLException: Cannot set auto commit to "true" when in = distributed transaction. at weblogic.jdbc.wrapper.JTSConnection.setAutoCommit(JTSConnection.= java:593) at org.apache.jackrabbit.core.util.db.ConnectionHelper.getConnectio= n(ConnectionHelper.java:439) at org.apache.jackrabbit.core.util.db.ConnectionHelper.startBatch(C= onnectionHelper.java:239) at org.apache.jackrabbit.core.journal.DatabaseJournal.startBatch(Da= tabaseJournal.java:506) at org.apache.jackrabbit.core.journal.DatabaseJournal.doLock(Databa= seJournal.java:474) Does somebody know how to use javax.transaction.UserTransaction in JackRabb= it and how the datasource has to be configured? Thx in advance! ferry malzer