RMI - Advanced Java Test

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 Answer

ANSWER: A) True




2) 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 Answer

ANSWER: C) Both A & B




3) 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 Answer

ANSWER: A) Stub




4) 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 Answer

ANSWER: E) Both A & C




5) 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 Answer

ANSWER: 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 Answer

ANSWER: 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 Answer

ANSWER: 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 Answer

ANSWER: 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 Answer

ANSWER: A) rebind ()




10) 1099 is the default port used by RMI Registry?

A) True
B) False
View Answer / Hide Answer

ANSWER: A) True




11) 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 Answer

ANSWER: 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 Answer

ANSWER: 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 Answer

ANSWER: 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 Answer

ANSWER: A) True




15) 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 Answer

ANSWER: 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 Answer

ANSWER: B) UDP




17) RMI Architecture consists of how many layers?

A) 5
B) 3
C) 4
D) 2
View Answer / Hide Answer

ANSWER: C) 4




18) 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 Answer

ANSWER: 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 Answer

ANSWER: 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 Answer

ANSWER: B) Client




21) 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 Answer

ANSWER: 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 Answer

ANSWER: 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 Answer

ANSWER: D) java.rmi




24) 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 Answer

ANSWER: 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 Answer

ANSWER: A) True




26) RMI is a server-side component; It is not required to be deployed on the server?

A) True
B) False
View Answer / Hide Answer

ANSWER: B) False




27) 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 Answer

ANSWER: B) RMI




28) 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

ANSWER: A) True


Post your comment

    Discussion

  • RE: RMI - Advanced Java Test -mayur kakad (06/29/16)
  • Que no 17's answer is wrong.. make it correct..
    actual answer is 3 layer and these layers are follow

    The three layers are the Stub and Skeleton Layer, the Remote Reference Layer, and the Transport Layer