RMI Remote Object
Explain the various methods of registering and gaining access to the Remote Object.The methods of remote objects are to be invoked by implementing the java.rmi.Remote interface.
Methods of Remote Object
- Binds the specified name to the remote object.
- The name parameter of this method should be in an URL format.
- Destroys the binding for a specific name of a remote method in the registry.
- Binds again the specified name to the remote object.
- The current binding will be replaced by rebinding.
- Returns the names of the names that were bound to the registry in an array form.
- These names are in the form of URL-formatted string.
- A stub, a reference will be returned for the remote object which is related with a specified name.
Explain the steps to create RMI-based clients and server.Creation of RMI-based Server:
- Create the Servant interface and the Servant component class.
- To host these servant classes create the RMI Server.
- Compile the class files and generate the Skeletons and IDL File.
- Start up the Server.
Creation of RMI-based Client:
- Create the Client class.
- Copy the IIOP Stubs and compile the Client.
- Make sure the Server is running and then startup the Client.
What are Remote callbacks?In client-server technology / architecture, a server responds to a remote client. A call back is a method invocation from one application (Application A) from another application (Application B), as a result of action that was performed by the Application B earlier. The Application A may run on a client and the Application may run on a server. To perform the call back mechanism the system that Application A runs acts as a Server and that of the Application B runs acts as a client.
What is Object Activation?Object Activation is a process of providing persistent references to the objects. It also includes the managing the execution of implementing of objects. RMI activates the objects for the execution as and when needed. The appropriate execution is initiated inside the appropriate JVM when the activatable remote object is accessed which is not currently running.
RMI: Data transfer in RMI model
Data transfer in RMI model - Discuss data transfer in RMI model, What is object serialization in RMI?, What is RMI callback mechanism?..