Will multiple Lan cards cause problems using rmi?
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Andy_Ho
Posted On:   Thursday, May 10, 2001 12:37 PM

If a host has two or more network cards (only one of which is Internet-enabled), how does RMI know which IP address to use? There seems to be a problem when such a client registers with an RMI service, and has a client-side callback method invoked by the server.

Re: Will multiple Lan cards cause problems using rmi?

Posted By:   Chris_Arrowood  
Posted On:   Friday, June 22, 2001 10:44 AM

Possibly.



Even if the RMI Registry is started running on the fully qualified domain name that you have chosen, the RMI objects may have the local unqualified name embedded in them.



The answer is to set the system property java.rmi.server.hostname before starting the RMI Registry.



See the Suns FAQ on this topic at http://java.sun.com/products/jdk/1.2/docs/guide/rmi/faq.html#domain

Re: Will multiple Lan cards cause problems using rmi?

Posted By:   Luigi_Viggiano  
Posted On:   Friday, June 22, 2001 03:24 AM

No it shouldn't cause problems. When getting the Registry you can specify the server (or the IP address)

Registry registry = LocateRegistry.getRegistry(host, port);

if you have more than one ip, just specify one of them. If you are getting any problem, please report us with the exception stacktrace and (possibly) the src code portion in troubles.
About | Sitemap | Contact