jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From intovoid <intov...@gmail.com>
Subject RMI Server / Client - Lock
Date Thu, 06 Sep 2007 06:15:39 GMT

I am trying to make a RMI server with a client to connect to the server. I
used the code from the wiki example:


System.setProperty("org.apache.jackrabbit.repository.home", "c:/jcr");
Repository repository = new TransientRepository();
ServerAdapterFactory factory = new ServerAdapterFactory();
RemoteRepository remote = factory.getRemoteRepository(repository);
Registry reg = LocateRegistry.createRegistry(RMI_PORT);
reg.rebind("jackrabbit", remote);


ClientRepositoryFactory factory = new ClientRepositoryFactory();
Repository repository =
Session session = repository.login();
try {
  String user = session.getUserID();
  String name = repository.getDescriptor(Repository.REP_NAME_DESC);
  System.out.println("Logged in as " + user + " to a " + name + "
} finally {

When i run both classes from within Eclipse it works, when i jar the RMI
server and start it in a DOS box and after that i run the Client in Eclipse
i get the following message:

WARN - Existing lock file C:\jcr\.lock detected. Repository was not shut
down properly.

When i kill the server and delete the .lock it gives me the same result and
leaves the .lock behind.

Does anyone have an idea on what i am doing wrong ?

View this message in context: http://www.nabble.com/RMI-Server---Client---Lock-tf4389896.html#a12516250
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

View raw message