Exams Attended

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

RMI Interview Questions and Answers

Ques. Explain how URL convention is used for accessing the registry.
Ans. The class rebind () method of java.rmi.Naming class is used to specify the port number . For example if the registry is running on a port number 3271 of an application named HelloRMIRegistry the following is the usage of the URL to reference the remote object:

Naming.rebind ("//host:1111/RMIRegistry", obj);

The URL stored on the web page needs to specify the non-default port number.
When the serverís remote objects created by the server can include the URL from which the stub class can dynamically be downloaded to the client. The following example depicts this:

java -Djava.rmi.server.codebase=http://host/username/codebase/examples.ExampleRMIURL
Is it helpful? Yes No

Most helpful rated by users:

©2021 WithoutBook