Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 45372 invoked from network); 29 Oct 2006 01:00:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Oct 2006 01:00:26 -0000 Received: (qmail 52157 invoked by uid 500); 29 Oct 2006 01:00:37 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 51794 invoked by uid 500); 29 Oct 2006 01:00:36 -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 51785 invoked by uid 99); 29 Oct 2006 01:00:36 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 28 Oct 2006 18:00:36 -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; Sat, 28 Oct 2006 18:00:23 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 523787142D1 for ; Sat, 28 Oct 2006 17:59:18 -0700 (PDT) Message-ID: <12384287.1162083558334.JavaMail.root@brutus> Date: Sat, 28 Oct 2006 17:59:18 -0700 (PDT) From: "Edgar Poce (JIRA)" To: dev@jackrabbit.apache.org Subject: [jira] Commented: (JCR-593) JCASessionHandle fail when i invoke logout method In-Reply-To: <2697336.1160987615001.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 [ http://issues.apache.org/jira/browse/JCR-593?page=3Dcomments#action_1= 2445422 ]=20 =20 Edgar Poce commented on JCR-593: -------------------------------- I think the jca project is not handling the close method properly because = there shouldn't be a bind to transaction configuration option. The jca proj= ect should bind the jcr session to the transaction only if a logout call wa= s made inside a transaction. WDYT? I'll prepare a patch asap. I don't think the proposed patch is a good fix. With the proposed patch if = the client doesn't participate in a transaction when it tries to close the = session the call will be ignored causing a session leak. In the current revision the jcr session is bound to the transaction lifecyc= le *optionally*. If the jcr module closes the session you can set the optio= n to false and it should work fine for you. thanks > JCASessionHandle fail when i invoke logout method > ------------------------------------------------- > > Key: JCR-593 > URL: http://issues.apache.org/jira/browse/JCR-593 > Project: Jackrabbit > Issue Type: Improvement > Components: jca > Affects Versions: 1.0.1, 1.1 > Reporter: Jorge Rodr=C3=ADguez Pedrianes > > I think that the "logout method" (in JCASessionHandle) isn't totally corr= ect. I consider that we must check, before closing session, if this session= is binded to a transaction. In this situation the session mustn't be close= d: transaction will close it. > public void logout() { > if (!mc.getManagedConnectionFactory().getBindSessionToTrasactio= n().booleanValue()) { > mc.closeHandle(this); > } > } > For example this is very important when we use spring, springmodules (jcr= module) and jackrabbit because the springmodules library closes session wh= en local transaction finishes. And if the session is closed by transaction = a exception is throwed. > Thanks --=20 This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: htt= p://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira