Presentation is loading. Please wait.

Presentation is loading. Please wait.

A First Java ORB Application 1  Object Request Broker (ORB)  This is the object manager in CORBA  Mechanisms for specifying interfaces  Interface Definition.

Similar presentations


Presentation on theme: "A First Java ORB Application 1  Object Request Broker (ORB)  This is the object manager in CORBA  Mechanisms for specifying interfaces  Interface Definition."— Presentation transcript:

1 A First Java ORB Application 1  Object Request Broker (ORB)  This is the object manager in CORBA  Mechanisms for specifying interfaces  Interface Definition Language (IDL) - for static interface definitions  Dynamic Invocation Interface (DII) - lets clients access interfaces as first-class objects at run-time from an Interface Repository.  Internet Inter-Orb Protocol (IIOP)  A binary protocol for communication between ORBs.  Was added in CORBA 2.0

2 A First Java ORB Application 2 CORBA Application Development Process  Write IDL  Compile IDL  Identify the IDL compiler-generated interfaces and classes that we need  Write code to initialize the ORB and inform it of any CORBA objects created  Compile all the generated code and application code  Run the application

3 A First Java ORB Application 3 Building CORBA Application Hello world

4 A First Java ORB Application 4 Interface Specification // idl file module helloWorld{ interface GoodDay{ string hello(); };  Compile the idl file, generate the following set of files: GoodDay.java GoodDayHolder.javaGoodDayHelper.java _GoodDayStub.javaGoodDayPOA.java GoodDayOperations.javaGoodDayPOATie.java

5 A First Java ORB Application 5 Generated Files  GoodDay.java: java interface mapped from IDL interface  GoodDayHolder: provide support to handle IDL inout and out parameters  GoodDayHelper: contains supporting methods, most used one is narrow()  _GoodDayStub.java: client side stub code  GoodDayPOA.java: contains the skeleton code that is used with POA  GoodDayOperations.java and GoodDayPOATie.java contain skeleton code that are used with Tie approach

6 A First Java ORB Application 6 Client Side  Initialize the CORBA environment: obtain a reference to the ORB  Obtain an object reference for the object on which to invoke operations  Invoke operation and process the results  Example  Code from Ch. 4

7 A First Java ORB Application 7 Server Side  Initialize the CORBA environment, the ORB (the same as client side)  Create implementation object  Make the implementation object accessible by clients  Listens for events  Code  Ch4 server code

8 A First Java ORB Application 8 Holder Type for out and inout parameters Holder Object public short value; shorterHolder minute;

9 A First Java ORB Application 9 Extending the Hello Example … string hello(out short hour, out short minute); }; … };


Download ppt "A First Java ORB Application 1  Object Request Broker (ORB)  This is the object manager in CORBA  Mechanisms for specifying interfaces  Interface Definition."

Similar presentations


Ads by Google