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: > /** > * Repository-wide timer instance. > */ > private final Timer timer = new Timer(false); > > Where the boolean is indicates if the wrapped java.util.Timer > instances get kicked off with the daemon flag. Making the change in > org.apache.jackrabbit.core.RepositoryContext: > private final Timer timer = new Timer(true); > > Resolves the JVM shutdown issues. I'd recommend this change be made in > line with a similar change for > https://issues.apache.org/jira/browse/JCR-2752. From what I can tell > this timer is only used by the SearchIndex so no need for it to be > non-daemon. > > If more information is needed or I should raise this on the dev list > or JIRA let me know.
yes, please please create a jira issue. this problem seems to be a regression of JCR-2836 and related to JCR-600. 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. > > On a related note, I'd also like to suggest the code in > org.apache.jackrabbit.util.Timer.schedule(Task, long, long) kick off > the Timer with a name plus the daemon flag to avoid getting default > thread names in the form of "Timer-n" which make it harder to track. > Happy to submit code for this. patches are always welcome :) cheers stefan > > 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 >
