Java Programming Question and Answers

21. What does CORBA offer Java Programmers?
 
  • CORBA offers high level distributed object paradigm to Java Programmers. The following are the advantages for using the Java language mapping of OMG IDL.
  • Interfaces defined independently of implementations – This separation is particularly useful for software engineering processes. Access to objects implemented in other programming languages – CORBA supports multiple language mappings for OMG IDL so that different components of a system or application can be implemented in different programming languages.
  • Access to objects regardless of their location (location transparency) – Socket or URL based distributed applications need to address a server by specifying a host name and a port number. In contrast, CORBA provides location transparency, which means that an object is identified independently of the physical locations and can potentially change its location without breaking the application.
  • Automatic code generation to deal with remote invocations – Stub and Skeleton codes are generated automatically. IDL compilers create representations of IDL defined constructs, such as constants, data types and interfaces in a particular language binding, for examples C++ or Java.
  • Access to standard CORBA services and facilities – Naming Services, Trading Service, Event Service, Transaction Services are few examples of CORBA services. There are specifications of higher level application oriented services which are known as CORBA facilities. The above services and facilities of CORBA are reusable.
 
Your Name Your Email-ID
Your Answer
22. Write the server interface by extending java.rmi.Remote interface and declare remote methods for clients?
  import java.rmi.*;
public interface ServerInterface extends Remote
{
public void register ( String S, ClientInt ci) throws RemoteException;
public void send (string s) throws RemoteException;
Public String[] list () throws RemoteException;
}
 
Your Name Your Email-ID
Your Answer
23. What types of event channel models does the Event Service provide?
  The event service provides two types of communication models
  • Push model
  • Pull model
  • In the push model, the supplier objects control the flow of data by pushing it to consumers.
  • In the pull model, consumer objects control the flow of data by pulling down data from the supplier. The push model is the more common of the two communication models.
 
Your Name Your Email-ID
Your Answer
24. Give the diagrammatic representation of Pull and Push models?
 
 
Your Name Your Email-ID
Your Answer
12345678 Page 6 of 8