Rmi

Hi,

How can i run the the the rmi registry of different machine and run the server on another machine (i.e. both on different machine) and then the server communicate with the machine which is running the rmiregistry.

Also when the rmi server communicate with the machine that is only running the rmiregistry then do the Policy need for communication (i.e. Network permissions) since i am already using Java SE 1.6?

I searched but only getting example of both running on a single machine.

Please help :slight_smile:

Thanks

I think that Naming.bind () and rebind() works for the the local hosts but it will not works for the remote hosts. There is lookup() available for non-local machine but it can only do the read operation no write.

Need some assisatance.

Also is there a better approach to handle timeouts in Java RMI, without using server timeout or socket timeout parameters ?

I think you just need to specify the host running the remote registry when you bind an object. Like in this example

http://download-llnw.oracle.com/javase/1.4.2/docs/guide/rmi/getstart.doc.html

In the class HelloImpl the line…

Naming.rebind(“//myhost/HelloServer”, obj);

In place of “myhost” you put the server hosting the registry.