Java RMI Interview Questions and Answers - 1
Question: 1
What is RMI?
Remote Method Invocation allows java object that executes on one machine and to invoke the method of a java object to execute on another machine.
The steps involved in developing an RMI object are
Defining the interfaces
Implementing these interfaces
Compile the interfaces and their implementations with the java compiler
Compile the server implementation with RMI compiler
Run the RMI registry
Run the application
Question: 2
What is RMI architecture?
RMI architecture consists of four layers and each layer performs specific functions.
Application layer – contains the actual object definition
Proxy layer – consists of stub and skeleton
Remote Reference Layer – gets the stream of bytes from the transport layer and sends it to the proxy layer.
Transportation layer machine communication – responsible for handling the actual machine to machine communication.
Question: 3
What is unicast remote object?
All remote objects must extend unicast remote object, which provides functionality that is needed to make objects available from remote machines.
Question: 4
Explain the methods, rebind() and lookup() in Naming class?
rebind() of the Naming class (found in java.rmi) is used to update the RMI registry on the server machine.
Naming.rebind (“AddServer”, AddServerImpl);
lookup() of the Naming class accepts one arguments, the rmi URL and returns a reference to an object of type AddServerImpl.
1000+ GRE Non Verbal Reasoning Questions and Answers Pdf More
1000+ Non Verbal Reasoning Grouping of Images Questions Pdf More
Non Verbal Reasoning Grouping of Identical Figures Questions More
1000+ Transformation of Sentences Worksheet with Answers Pdf More
1000+ Ethiopian Bank Interview Questions and Answers Pdf More
UPSC IAS Exam Prelims 2020-2021 Hydro Electric Power Plants in India More
1000+ Latest Computers & Technology Quiz 2020-2021 More
1000+ Verbal Reasoning Classification Questions for SSC CGL Pdf More
World Economy GK Questions and Answers More
100+ Chemistry Interview Questions and Answers Pdf More