Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is it possible to register multiple nonlocal remoteobjects with rmiregistry ?

 
raj hyd
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to register multiple nonlocal remote objects(may be more than 100) with rmiregistry on local machine?

When nonlocal remote object(on some other machine) trys to register with rmiregistry i am getting exception similar to

RemoteException occurred in server thread;
Nested exception is: java.rmi.AccessException: Registry.Registry.rebind disallowed; origin 10.22.190.21 is non-local host

Am i missing something.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The implementation of the RMI Registry doesn't allow remote binding/unbinding because of security reasons - anyone could come along and unbind or replace the objects you have bound in the registry. You *could* implement your own version of the RMI Registry - but it would probably be easier to just use something like Jini that allows this.
 
Edward Harned
Ranch Hand
Posts: 291
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The RMIRegistry is local for each machine.

You cannot register a non-local reference.

I suppose your next question will be how to connect rmi servers from different locations?

This is what Jini.org is all about.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic