This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Distributed Java and the fly likes Is it possible to register multiple nonlocal remoteobjects with  rmiregistry ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "Is it possible to register multiple nonlocal remoteobjects with  rmiregistry ?" Watch "Is it possible to register multiple nonlocal remoteobjects with  rmiregistry ?" New topic
Author

Is it possible to register multiple nonlocal remoteobjects with rmiregistry ?

raj hyd
Greenhorn

Joined: Jun 26, 2006
Posts: 9
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

Joined: Oct 18, 2000
Posts: 4121

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.


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Edward Harned
Ranch Hand

Joined: Sep 19, 2005
Posts: 291

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.


Ed's latest article: A Java Parallel Calamity http://coopsoft.com/ar/Calamity2Article.html
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Is it possible to register multiple nonlocal remoteobjects with rmiregistry ?
 
Similar Threads
"java.net.ConnectException: Connection refused" got in Linux (RedHat 9)
2 RMI specific questions!
RMI problem
Useful Article: "Applying the Factory Pattern to RMI"
Bind object to a registry on another machine