Java Programming Question and Answers

13. What is a gate keeper?
  A gate keeper is a Java web server. It communicates with the server on behalf of a client (applet).
 
Your Name Your Email-ID
Your Answer
14. How is a name used?
  A name can be used in the following order
  • An object implementation can bind a name to one of its objects within a namespace.
  • Client application can then use the same namespace to resolve a name.
  • It can obtain an object reference.
  • Client applications can later use the reference to invoke methods on the object.
 
Your Name Your Email-ID
Your Answer
15. What do you know about RMI?
 
  • RMI (Remote Method Invocation) is an important feature which allows building of distributed applications in Java.
  • RMI allows a Java object that executes on one machine to invoke a method of a Java object that executes on another machine.
  • A Java program can make a call on a remote object once it obtains a reference to the remote object by receiving the reference as an argument or a return value.
  • RMI uses Object Serialization to marshal and unmarshal parameters.
 
Your Name Your Email-ID
Your Answer
16. Define the terms marshalling and un-marshalling in RMI?
 
  • Marshalling is the process of converting the object into a stream that can be passed on network in such a way that the object can be reconstructed using that stream. In addition to the object information it will also send the URL for that class. That URL is used on the receiving end of the network to get the class definition, if it is not available. The stream passed is called marshal stream.
  • Un-marshalling is the process of reconstructing the object using the marshal stream. If the class definition is not available, it loads the class from the source specified by URL in the marshal stream.
 
Your Name Your Email-ID
Your Answer
12345678 Page 4 of 8