jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Müller <thomas.muel...@day.com>
Subject Re: force repository open?
Date Tue, 15 Sep 2009 07:54:39 GMT
Hi,

If the .lock file still exists, but not locked, this is not a problem.
You will get a warning in the log file, but you can still open the
repository.

However if the .lock file is still locked (file lock), that would mean
the repository is still open. This is to avoid repository corruption.
I guess you don't want to risk that. If you can't close the repository
properly, you could wait until it is garbage collected (calling
System.gc() in a loop).

Regards,
Thomas

On Mon, Sep 14, 2009 at 7:44 PM, Bear Giles <bgiles@coyotesong.com> wrote:
> Is there a safe way to force a repository open
> (RepositoryImpl.create(config))?  It looks like some of my unit tests are
> exiting in a way that prevents the shutdown method from getting called and
> this leaves the lock file in place.  For now I'm simply deleting it
> programmatically on startup but of course that's risky.
>
> To answer the obvious question these aren't my unit tests - it's 900+ unit
> tests for other pieces of the application.  We only need the repository for
> two test classes but spring has decided to call the factory method anyway.
>

Mime
View raw message