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:[EMAIL PROTECTED] On Behalf Of Daniel Br?uen > Sent: Friday, August 24, 2007 2:50 PM > To: [email protected] > 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
