What is relationship between RMI interface and stub?

Discussions

General J2EE: What is relationship between RMI interface and stub?

  1. Hi:
      I think the stub is enough to remote call, why to use RMI interface? what relationship between RMI interface and stub?

    Regards!
    Stive
  2. Hi,

    RMI is a cross between remote procedure call and mobile objects.A server-side object is created, along with a stub object. Both the server-side object and the stub implement a "well known" interface. The server-side object remains on the server, and receives and executes remote method calls.The stub is moved as a mobile object to a client. The client makes calls on the stub which makes remote calls on the server-side object.

    you can get more info from the below site

    http://java.sun.com/j2se/1.3/docs/guide/rmi/spec/rmi-arch2.html

    Cheers
    Vj