Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 36376 invoked from network); 24 Aug 2007 08:32:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Aug 2007 08:32:37 -0000 Received: (qmail 82887 invoked by uid 500); 24 Aug 2007 08:32:33 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 82869 invoked by uid 500); 24 Aug 2007 08:32:32 -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 82860 invoked by uid 99); 24 Aug 2007 08:32:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Aug 2007 01:32:32 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=MISSING_MID,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [89.149.215.132] (HELO europe.computation.de) (89.149.215.132) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Aug 2007 08:32:26 +0000 Received: (qmail 25894 invoked by uid 89); 24 Aug 2007 08:32:09 -0000 Received: from unknown (HELO hendrik) (84.167.78.123) by 0 with SMTP; 24 Aug 2007 08:32:09 -0000 From: "Hendrik Beck \(camunda\)" To: Subject: RE: Repository Lock Problem in JEE-Environment Date: Fri, 24 Aug 2007 15:32:34 +0700 MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138 In-Reply-To: Thread-Index: AcfmI4j+XOyl6grWQUSYsJDgf3haIQABIhsA X-Virus-Checked: Checked by ClamAV on apache.org Message-Id: <20070824083235.ED660724882@athena.apache.org> Hi Dan! Wait, I am not 100% sure what we are talking about here. I would see it like that: - One instance of Jackrabbit is allowed to access the repository (i.e. the physical storage of the repository) at a time. That's why the repository is locked by that instance e.g. by setting the .lock file - This instance of Jackrabbit has to be started somehow. Depending on your deployment model (http://jackrabbit.apache.org/doc/deploy.html) this is done in different ways. I assumed that you use model 2 which means that Jackrabbit is started at container startup and then registered into JNDI. - If you now access it via JNDI you get a reference to the repository, login into that repository and then get a session handle back. This can be done by multiple beans / applications the same time What deployment model do you use? Or do you start and shutdown the repository by your own application, e.g. in your beans? > -----Original Message----- > From: news [mailto:news@sea.gmane.org] On Behalf Of Daniel Br?uen > Sent: Friday, August 24, 2007 2:50 PM > To: users@jackrabbit.apache.org > Subject: Re: Repository Lock Problem in JEE-Environment > > Hi Hendrik! > > Hendrik Beck (camunda) wrote: > > > > @Resource (name="jcr/local") private Repository repository; > > > > (...) > > > > Yes, I have done that already.... but it does not help if two > bean-instances are created, because the second bean is not able to get > the repository via jndi (because the repository is already locked). > > Furthermore whenever I do not call shutdown() explicitly I have to rely > on the Garbage Collector to unlock my repository. > > I am sure there is something in this entiry concept that I am missing... > otherwise the whole thing would not make that much sense at all! > > Cheers, > Dan