jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Anstis <michael.ans...@gmail.com>
Subject Continuous Integration: Rapid Session creation\shutdown - javax.jcr.RepositoryException: xxx appears to be already locked by the current process.
Date Tue, 12 Apr 2011 13:35:04 GMT
Hi,

We run a lot of JUnit tests during the CI build of our application.

These tests individually involve the following (some of which may or may not
be relevant, but I include here for completeness):-

    * creating a TransientRepository,
    * creating a Session,
    * configuring repository with a few custom node types,
    * running tests,
    * shutting down repository with repository.shutdown()

The tests work fine when ran on a local PC, but when ran on a server we
often encounter random (i.e. not consistent where they fall) errors
"javax.jcr.RepositoryException: The repository home XYZ appears to be
already locked by the current process."

I suspect the .lock file is not being cleared from the FileSystem before the
next test starts to run and hence the lock error is thrown.

Can anybody recommend an approach to ensure the Repository has been
completely shutdown and all FileSystem changes flushed?

I have posted the same question to Stackoverflow; I hope it does not present
any problems.

Thanks,

Mike

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message