• Post Reply Bookmark Topic Watch Topic
  • New Topic

rmiregistry on a different machine

 
Manaspratim Mitra
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How is the server code written for Naming.rebind() when the rmiregistry is needed to be run on a different machine?
What are the other changes that has to be done for doing the same?
 
Edward Harned
Ranch Hand
Posts: 291
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Server and RMIRegistry must be on the same machine.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a bit of a confusing issue... the implementation of Registry provided by the default rmiregistry does throw AccessExceptions on any remote calls that will alter the services bound to the registry. However, there's nothing specific to RMI that would prevent doing a remote bind - you would just have to provide a Registry implementation that would allow it. I believe that the default Registry provided through rmiregistry did allow this at one time, but this was changed due to security concerns.... I think sometime around the JDK 1.3 - 1.4 releases.
 
Edward Harned
Ranch Hand
Posts: 291
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've been using RMI since JDK 1.1. As far as I remember, the Server and Registry must be on the same machine.

As a client, you must know the ip address of the service. The specific location (RMIServer) comes from the registry.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!