jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amin_nr2000 <amin.aliza...@gmail.com>
Subject Multiple accesses to a repository
Date Fri, 08 Feb 2013 10:23:45 GMT

I have a running JCR. It's in use and creates/updates/removes content when

I have another Java project where I need a direct access to the repository. 
I try to connect by this code:

		Repository repository = new TransientRepository("target/repository.xml",
		Credentials myCredentials = new SimpleCredentials(userName,
		try {
			Session session = repository.login(myCredentials);
		} catch (LoginException e) {
		} catch (RepositoryException e) {

I also changed the relative paths for ${rep.home} and ${wsp.home} in
repository.xml to absolute paths.

It connects to the repository when the other project is not running and I
can access the content of the repository with no problem. But if I first run
the code in 'target' it locks the repository and it's impossible to connect
to the same repository in 'target' from the second project.

I even tried to remove the lock file .lock manually, but it didn't work.

Can anyone help me?


View this message in context: http://jackrabbit.510166.n4.nabble.com/Multiple-accesses-to-a-repository-tp4657670.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

View raw message