From dev-return-11118-apmail-jackrabbit-dev-archive=jackrabbit.apache.org@jackrabbit.apache.org Wed Mar 14 14:34:37 2007 Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 85988 invoked from network); 14 Mar 2007 14:34:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Mar 2007 14:34:35 -0000 Received: (qmail 18877 invoked by uid 500); 14 Mar 2007 14:34:41 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 18796 invoked by uid 500); 14 Mar 2007 14:34:41 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 18746 invoked by uid 99); 14 Mar 2007 14:34:40 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Mar 2007 07:34:40 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Mar 2007 07:34:31 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 5AE63714078 for ; Wed, 14 Mar 2007 07:34:11 -0700 (PDT) Message-ID: <17062727.1173882851369.JavaMail.jira@brutus> Date: Wed, 14 Mar 2007 07:34:11 -0700 (PDT) From: "Dominique Pfister (JIRA)" To: dev@jackrabbit.apache.org Subject: [jira] Commented: (JCR-769) Unable to login with two different Credentials to same workspace in one Transaction In-Reply-To: <26328297.1172563568650.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/JCR-769?page=3Dcom.atlassian.ji= ra.plugin.system.issuetabpanels:comment-tabpanel#action_12480788 ]=20 Dominique Pfister commented on JCR-769: --------------------------------------- As you correctly identified, if there are two sessions (or branches) involv= ed in the same transaction, let's say TX1B1 and TX2B2, the sequence of call= s: TX1B1.prepare TX1B2.prepare TX1B1.commit TX1B2.commit willl timeout in the call to TX1B2.prepare. But fixing the problem is not s= imply a matter of replacing the exclusive lock obtained in TX1B1.prepare wi= th a more "concurrency-friendy" one, but one would have to eventually merge= the changes in TX1B1 and TX2B2 and detect potential conflicts, which is fa= r more complicated and currently not implemented. In other words: this bug is absolutely legitimate, but in your situation on= e can work around it. > Unable to login with two different Credentials to same workspace in one T= ransaction > -------------------------------------------------------------------------= ---------- > > Key: JCR-769 > URL: https://issues.apache.org/jira/browse/JCR-769 > Project: Jackrabbit > Issue Type: Bug > Components: jca > Affects Versions: 1.2.1 > Environment: Websphere 5.1.1 J2C Adapter > Reporter: Claus K=C3=B6ll > Attachments: patch.txt, stacktrace.txt > > > I'm using the Jackrabbit 1.2.1 JCA adapter and trying to access in a Sess= ionBean-Method with Container Transaction a Workspace with 2 different Cred= entials.=20 > The Method takes about 400ms to finish but no commit on TransactionContex= tr occurs (Debugging ..) only the prepare was called 2 times . > The Container hangs on the PostInvoke Method about 5 seconds and then i g= et a "javax.transaction.xa.XAException"=20 > with the Warn Message: Transaction rolled back because timeout expired > The code .. > Context ctx =3D new InitialContext();=20 > Repository repository =3D (Repository) ctx.lookup("java:comp/env/jackrabb= it");=20 > Credentials credentials =3D new SimpleCredentials("user1", "password1".to= CharArray());=20 > Credentials credentials2 =3D new SimpleCredentials("user2", "password2".t= oCharArray());=20 > Session session1 =3D repository.login(credentials, "default");=20 > Session session2 =3D repository.login(credentials2, "default");=20 > Session1 adds a node to the workspace .. and with the session2 i do nothi= ng except the login ! > If i make no second login the Method works fine. --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.