Monday, September 7, 2009

Java RMI Interview Questions

What is the difference between URL instance and URLConnection instance?

A URL instance represents the location of a resource, and a URLConnection instance represents a link for accessing or communicating with the resource at the location.

 How do I make a connection to URL?

You obtain a URL instance and then invoke openConnection on it. URLConnection is an abstract class, which means you can’t directly create instances of it using a constructor. We have to invoke openConnection method on a URL instance, to get the right kind of connection for your URL. Eg. URL url;

URLConnection connection;

try {

url = new URL(”…”);

connection = url.openConnection();

} catch (MalFormedURLException e) { }

 What Is a Socket in Java Networking and RMI?

A socket is one end-point of a two-way communication link between two programs running on the network. A socket is bound to a port number so that the TCP layer can identify the application that data is destined to be sent. Socket classes are used to represent the connection between a client program and a server program. The java.net package provides two classes–Socket and ServerSocket–which implement the client side of the connection and the server side of the connection, respectively.

What information is needed to create a TCP Socket?

The Local System?s IP Address and Port Number. And the Remote System’s IPAddress and Port Number.

 What are the two important TCP Socket classes?

Socket and ServerSocket. ServerSocket is used for normal two-way socket communication. Socket class allows us to read and write through the sockets. getInputStream() and getOutputStream() are the two methods available in Socket class.

 

              Why do you use UniCastRemoteObject in RMI ?

              How many interfaces are used in RMI?

              Can Rmi registry be written in the code, without having to

              write it in the command prompt and if yes where?

              Why is Socket used ?

              When MalformedURLException and UnknownHost Exception throws ?

              What is meant by RMI ?

              Explain RMI Architecture ?

              What is meant by a stub ?

              What is meant by a skelotn ?

              What is meant by serialisation and deserialisation ?

              What is meant by RRL ?

              What is the use of TL ?

              What is RMI Registry ?

              What is rmic ?

              How will you pass parameter in RMI ?

              What exceptions are thrown by RMI ?

              What are the steps involved in RMI ?

              What is meant by bind(), rebind(), unbind() and lookup() methods?

              What are the advanatages of RMI ?

              What is JNI ?

              What is Remote Interface ?

              What class is used to create Server side object ?

              What class is used to bind the server object with RMI Registry ?

              What is the use of getWriter method ?

              Explain RMI Architecture?

              What is the difference between RMI & Corba ?

              What are the services in RMI ?

              In RMI, server object first loaded into the memory and then

              the stub Reference is sent to the client ? or whether a stub

              reference is directly sent to the client ?

              Suppose server object is not loaded into the memory, and the

              Client request for it , what will happen?

              What is serialization ?

              Can you load the server object dynamically? If so,what are

              the Major 3 steps involved in it ?

              What is difference RMI registry and OSAgent ?

              To a server method, the client wants to send a value 20,

              with this value exceeds to 20,. a message should be sent to the client ?

              What will you do for achieving for this ?

              Can you run the product development on all operating systems?

              Can we send object using Sockets ?

              What is the RMI and Socket ?

              What is the protocol used by server and client ?

              Can I modify an object in CORBA ?

              What is the functionality stubs and skeletons ?

              What is an RMI?

              How will you pass parameters in RMI ? Why u serialize?

              What is the main functionality of the Remote Reference Layer ?

              How do you download stubs from a Remote place ?

              I want to store more than 10 objects in a remote server ?

              Which Methodology will follow ?

              Write a program on RMI and JDBC using StoredProcedure ?

              What is meant by distributed Application ? Why we are using that in our applications ?

              What is the functionality of the stub ?

              How to generate skeleton & Stub classes?

              Explain lazy activation?

              Firewalls in RMI ?

1

2

3

4

5

6

7

8

 

No comments:

Post a Comment