150 likes | 181 Views
CORBA (Common Request Broker Architecture). IST 411/INFSY 436 Spring 2006. CORBA. Developed by a group of 700 companies called Object Management Group (OMG) Supports distributed objects programmed in variety of languages on varying operating systems
E N D
CORBA(Common Request Broker Architecture) IST 411/INFSY 436 Spring 2006
CORBA • Developed by a group of 700 companies called Object Management Group (OMG) • Supports distributed objects programmed in variety of languages on varying operating systems • Application transparency is a goal of CORBA
CORBA • Interface Definition Language (IDL) • Language to define interfaces to CORBA objects • Defines instance variables • Defines methods • An IDL compiler takes an IDL file (.idl) & generates CORBA compliant code • To develop a Java front-end to a legacy COBOL system, 2 compilers are needed • Client-side Java code • COBOL-side server code
CORBA • Client Stubs • Code and data used by client as a proxy for real object that reside on the server • Server Skeletons • Code that carries out functions • For example, extract arguments from a RMI and carry out the actual process of sending a message
CORBA • Object Request Broker • Provides plumbing between distributed objects and the clients • Communicates with the transport medium used to convey raw data • All vendors must IIOP (Internet Inter-ORB Protocol)
CORBA • CORBA provides a large number of services • Services are transparent to the programmer • List of some on pg. 188
CORBA • Interface Definition Language sample module Tester { interface Single { attribute string exname; readonly attributes string location; string returnsVals(in string point); } } attribute = variable readonly = read only variable
CORBA • IDL generates Java code package Tester; public interface Single extends org.omg.CORBA.Object { String exname( ); void exname(String arg); String location( ); String returnsVals(String point); }
CORBA • How does the IDL get converted to Java? • ANSWER: • File containing the IDL is processed by a utility which carries out the conversion • Using classes provided as part of a Java 2 package, you would us a utility know as idltojava • IDL compiler is part of Sun Java 5.0 JDK (idlj.exe in bin folder)
CORBA • Attributes are basic types similar to types in Java
CORBA • IDL contains facility for associating a number of types together so they can be passed as an argument in a method • struct struct WorkPlace { string name; boolean mobile; };
CORBA • IDL sequence is like a one-dimensional array • Sequence can be fixed or can grow. • IDL array facility
CORBA • idltojava utility generated: • A file containing a Java interface with the same name as the Corba interface • Helper class which contains some utility methods • Main utility is called narrow • Holder class is used with out or inout arguments in methods • Stub class which communicates between remote code at client and ORB • Skeleton class for remote objects stored on a server