Deal All
I tried using the JCR-RMI interface as explained in this page : but its not
working !!!
I implemeneted a deamon that creates a repoository as follows :
Repository repository = new TransientRepository(); // The local
repository
String name = "AcopianRep"; // The RMI URL for the repository
RemoteAdapterFactory factory = new ServerAdapterFactory();
RemoteRepository remote = factory.getRemoteRepository
(repository);
Naming.bind(name, remote); // Make the RMI binding using
java.rmi.Naming
then at the client side as follows :
String name = "rmi://192.168.1.6:1099/AcopianRep";
ClientRepositoryFactory factory = new ClientRepositoryFactory();
Repository repository = (Repository)factory.getRepository(name);
Credentials credentials = new
SimpleCredentials("admin","admin".toCharArray());
repository.login(credentials);
I don't have problems when the server code and client code execute at the
same JVM .... but I have problem when I changelocal host to some other ip in
my network as in the previous code ... I can successfully get a repository
object , but when I try to execute repository.login(credentials) a
java.net.ConnectException is thrown with message "Connection refused to
host: 127.0.0.1 "
-------------------------------------------------------------------------------------
My Regards...
Yaqeen Hussam