I'm creating my own server wrapper around a RMI exposed repository.
I'm trying to figure out how to properly write the shutdown method.
In my start up method, I do the following:
RemoteRepository remote = factory.getRemoteRepository(repository);
Registry reg = LocateRegistry.createRegistry(1100);
reg.rebind("jackrabbit", remote);
In my shutdown method, I would like to follow RMI recommendations for
clean up. This includes two steps:
1) UnicastRemoteObject.unexport ()
2) reg.unbind()
Since, the ServerRepository object itself extends UnicastRemoteObject,
I wonder if it takes care of step one itself. Or perhaps there's some
higher level method for shutdown of the RMI'ness of the repository.
And, should I also call the JackrabbitRepository's shutdown method? I
think not, since I'm using the TransientRepository. Is this accurate?