RMI - Advanced Java Test
1) RMI allows an object to invoke methods on an object running in another JVM?
A) True
B) False
View Answer / Hide Answer2) RMI uses which objects for the communication with the remote object?
A) Stub
B) Skeleton
C) Both A & B
D) None of the above
View Answer / Hide Answer3) Which is an object, acts as a gateway for the client side, all the outgoing requests are routed through it, and it resides at the client side and represents the remote object?
A) Stub
B) Skeleton
C) Both A & B
D) None of the above
View Answer / Hide Answer4) When the skeleton receives the incoming request, it does the following tasks?
A) It reads the parameter for the remote method
B) It waits for the result
C) It writes and transmits (marshals) the result to the caller
D) It reads (unmarshals) the return value or exception
E) Both A & C
View Answer / Hide Answer5) In RMI Architecture which layer Intercepts method calls made by the client/redirects these calls to a remote RMI service?
A) Stub & Skeleton Layer
B) Application Layer
C) Remote Reference Layer
D) Transport Layer
View Answer / Hide AnswerANSWER: A) Stub & Skeleton Layer
6) RMI has which of these protocols implementations?
A) Java Remote Method Protocol (JRMP)
B) Internet Inter-ORB Protocol (IIOP)
C) Jinni Extensible Remote Invocation (JERI)
D) All mentioned above
View Answer / Hide AnswerANSWER: D) All mentioned above
7) In RMI which layer defines and supports the invocation semantics of the RMI connection, this layer maintains the session during the method call?
A) The Stub & Skeleton Layer
B) The Application Layer
C) The Remote Reference Layer
D) The Transport Layer
View Answer / Hide AnswerANSWER: C) The Remote Reference Layer
8) RMI uses which protocol on top of TCP/IP (an analogy is HTTP over TCP/IP)?
A) Java Remote Method Protocol (JRMP)
B) Internet Inter-ORB Protocol (IIOP)
C) Jinni Extensible Remote Invocation (JERI)
D) All mentioned above
View Answer / Hide AnswerANSWER: A) Java Remote Method Protocol (JRMP)
9) Which method of the Naming class (found in java.rmi) is used to update the RMI registry on the server machine?
A) rebind ()
B) lookup()
C) Both A & B
D) None of the above
View Answer / Hide Answer10) 1099 is the default port used by RMI Registry?
A) True
B) False
View Answer / Hide Answer11) In Naming class which method specifies name to a remote object?
A) bind(string name)
B) rebind(string name)
C) Both A & B
D) None of the above
View Answer / Hide AnswerANSWER: A) bind(string name)
12) Abbreviate the term DGC?
A) Digital Garbage Collection
B) Distributed Garbage Collection
C) Distributed Garbage Connection
D) None of the above
View Answer / Hide AnswerANSWER: B) Distributed Garbage Collection
13) In RMI the objects are passed by Value or Reference?
A) Objects are passed by value
B) Objects are passed by Reference
B) Objects are passed by value and reference
D) None of the above
View Answer / Hide AnswerANSWER: A) Objects are passed by value
14) The UnicastRemoteObject class provides support for point-to-point active object references using TCP streams?
A) True
B) False
View Answer / Hide Answer15) In a RMI Client Program, what are the exceptions which might have to handled?
A) RemoteException
B) NotBoundException
C) MalFormedURLException
D) All mentioned above
View Answer / Hide AnswerANSWER: D) All mentioned above
16) Which is a one-way communication only between the client and the server and it is not a reliable and there is no confirmation regarding reaching the message to the destination?
A) TCP/IP
B) UDP
C) Both A & B
D) None of the above
View Answer / Hide Answer17) RMI Architecture consists of how many layers?
A) 5
B) 3
C) 4
D) 2
View Answer / Hide Answer18) An RMI Server is responsible for,
A) Creating an instance of the remote object
B) Exporting the remote object
C) Binding the instance of the remote object to the RMI registry
D) All mentioned above
View Answer / Hide AnswerANSWER: D) All mentioned above
19) In RMI Distributed object applications need to do?
A) Locate remote objects
B) Communicate with remote objects
C) Load class definitions for objects that are passed around
D) All mentioned above
View Answer / Hide AnswerANSWER: D) All mentioned above
20) In RMI applications which program obtains a remote reference to one or more remote objects on a server and then invokes methods on them?
A) Server
B) Client
C) Both A & B
D) None of the above
View Answer / Hide Answer21) In RMI program the following example shows the,
import java.rmi.*;
public interface Adder extends Remote{
public int add(int x,int y)throws RemoteException;
}
A) Create and start the remote application
B) Create and start the client application
C) Create the remote interface
D) Provide the implementation of the remote interface
View Answer / Hide AnswerANSWER: C) Create the remote interface
22) In RMI program the following two steps are used to,
Either extend the UnicastRemoteObject class,
the exportObject() method of the UnicastRemoteObject class,
A) Provide the Implementation of the remote interface
B) Create the remote interface
C) Create and start the remote application
D) Compile the implementation class and create the stub and skeleton objects using the rmic tool
View Answer / Hide AnswerANSWER: A) Provide the Implementation of the remote interface
23) Which package is used for Remote Method Invocation (RMI)?
A) java.lang.rmi
B) java.lang.reflect
C) java.applet
D) java.rmi
View Answer / Hide Answer24) Java supports RMI, RMI Stands for?
A) Random Method Invocation
B) Remote Memory Interface
C) Remote Method Invocation
D) Random Method Invocation
View Answer / Hide AnswerANSWER: C) Remote Method Invocation
25) RMI uses a layered architecture; each of the layers could be enhanced or replaced without affecting the rest of the system?
A) True
B) False
View Answer / Hide Answer26) RMI is a server-side component; It is not required to be deployed on the server?
A) True
B) False
View Answer / Hide Answer27) Which is built on the top of socket programming?
A) EJB
B) RMI
C) Both A & B
D) None of the above
View Answer / Hide Answer28) RMI and EJB, provides services to access an object running in another JVM (known as remote object)?
A) True
B) False
View Answer / Hide Answer