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

Reply via email to