What is the difference between a stub and a skeleton?
Answer Posted / vetrivel.k
stup: A stub for a remote object acts as a client's local
representative or proxy for the remote object. The caller
invokes a method on the local stub which is responsible for
carrying out the method call on the remote object. In RMI,
a stub for a remote object implements the same set of
remote interfaces that a remote object implements.
When a stub's method is invoked, it does the following:
1.initiates a connection with the remote JVM containing the
remote object,
2.marshals (writes and transmits) the parameters to the
remote JVM,
3.waits for the result of the method invocation,
4.unmarshals (reads) the return value or exception
returned, and
returns the value to the caller.
* The stub hides the serialization of parameters and the
network-level communication in order to present a simple
invocation mechanism to the caller.
skeleton :In the remote JVM, each remote object may have a
corresponding skeleton (in Java 2 platform-only
environments, skeletons are not required). The skeleton is
responsible for dispatching the call to the actual remote
object implementation. When a skeleton receives an incoming
method invocation it does the following:
1.unmarshals (reads) the parameters for the remote method,
2.invokes the method on the actual remote object
implementation, and
3.marshals (writes and transmits) the result (return value
or exception) to the caller.
| Is This Answer Correct ? | 50 Yes | 7 No |
Post New Answer View All Answers
How would you reatach detached objects to a session when the same object has already been loaded into the session?
Define aop(assepct oriented programing)?
How would you create a button with rounded edges?
How task's priority is used in scheduling?
Why use a datasource when you can directly specify a connection details?
what are RemoteObjects?
What modifiers may be used with an interface declaration?
What restrictions are placed on the location of a package statement within a source code file?
whats is mean by tiles in struts
Why are some of the class and element names counter-intuitive?
What are the services in RMI ?
How substring() method of string class create memory leaks?
What are the call back methods in entity bean?
Where we can write Rmi registry in the code, without having to write it at the command prompt?
what is a non-repeatable read?