> This timer object should get cancelled (and the related thread closed) > when you shutdown the repository. Are you sure your repository is > closed when you're stopping the JVM?
In this environment the repository is accessed as JNDI resource (via org.apache.jackrabbit.core.jndi.BindableRepositoryFactory). I'm fairly certain there are no logged in sessions and it seems that the BindableRepository will be told to shutdown by tomcat but I haven't traced this. > It probably doesn't hurt to make the timer a daemon thread like was > done in JCR-2752 for the pool threads, but in both cases I feel that > the only real benefit of doing so is to make life easier for people > who don't properly manage the repository lifecycle (and harder for > people who try to track down possible problems because of that). Agreed, but it's probably better to err on the side of letting it be stopped - particularly when deployed in a servlet container. I've raised this as issue as JIRA JCR-3038 for consideration ... https://issues.apache.org/jira/browse/JCR-3038 Regards, Kevin -- Kevin Jansz [email protected] Level 7, 10-16 Queen Street, Melbourne 3000 Australia Tel +61 3 9621 2773 | Fax +61 3 9621 2776 Exari Systems Boston | London | Melbourne | Munich www.exari.com Test drive our software online - www.exari.com/demo-trial.html Read our blog on document assembly - blog.exari.com On 3 August 2011 20:21, Jukka Zitting <[email protected]> wrote: > Hi, > > On Wed, Aug 3, 2011 at 5:30 AM, Kevin Jansz <[email protected]> wrote: >> We've identified an issue where the JVM is prevented from stopping >> because of a non-daemon thread started by jackrabbit. I tracked it >> down (using jstack) to the "timer" in >> org.apache.jackrabbit.core.RepositoryContext: > > This timer object should get cancelled (and the related thread closed) > when you shutdown the repository. Are you sure your repository is > closed when you're stopping the JVM? > > On Wed, Aug 3, 2011 at 10:49 AM, Stefan Guggisberg > <[email protected]> wrote: >> i don't know why the repository global timer instance is created >> as 'non-daemon' but there might be a reason for it. jukka >> can probably answer this question. > > My rationale for not using a daemon thread was that the lifetime of > the thread is already managed by the repository, i.e. the thread ends > when the repository is closed. > > It probably doesn't hurt to make the timer a daemon thread like was > done in JCR-2752 for the pool threads, but in both cases I feel that > the only real benefit of doing so is to make life easier for people > who don't properly manage the repository lifecycle (and harder for > people who try to track down possible problems because of that). > > BR, > > Jukka Zitting >
