View RSS Feed

RMI

What is a remote object? Why UnicastRemoteObject should be extended?

Rating: 1 votes, 2.00 average.
by
RMI
, 01-02-2012 at 06:34 PM (7715 Views)
Remote object is considered to be the one in which other JVM are used to invoke the methods. Remote interface gets implemented by the remote object class. RMI is that application that produces various remote objects.
Responsibility of a RMI Server is:
• To create the remote object’s instance e.g CarImpl instance = new CarImpl()).
• Export the remote object.
• Bind the remote object instance to the RMI registry.

Client’s incoming calls are being accepted when remote object is exported. Remote object might be exported by extending java.rmi.server.UnicastRemoteObject, or when the class has been extended you might make use of static method.

UnicastRemoteObject.exportObject (this);

In case UnicastRemoteObject doesn’t get extended (you use UnicastRemoteObject.exportObject(…) ), it means that for the correct hashcode(), toString() and equals() implementations, responsibility rely upon class implementation. In RMI registry, a remote object gets registered by using:

Naming.rebind(String serviceName, Remote remoteObj);

Name:  37.JPG
Views: 3424
Size:  34.5 KB
Remote Objects

Submit "What is a remote object? Why UnicastRemoteObject should be extended?" to Facebook Submit "What is a remote object? Why UnicastRemoteObject should be extended?" to Digg Submit "What is a remote object? Why UnicastRemoteObject should be extended?" to del.icio.us Submit "What is a remote object? Why UnicastRemoteObject should be extended?" to StumbleUpon Submit "What is a remote object? Why UnicastRemoteObject should be extended?" to Google

Categories
Tutorial

Comments