Download presentation
Presentation is loading. Please wait.
Published byRoland Jordan Modified over 9 years ago
1
Copyright © 2003 ProsoftTraining. All rights reserved. Distributed Object Computing Using Java and CORBA
2
Copyright © 2003 ProsoftTraining. All rights reserved. Lesson 1: Introduction to CORBA
3
Objectives Describe the role of CORBA in developing enterprise applications Describe the role of the Object Management Group Describe the CORBA architecture
4
CORBA Overview Common Object Request Broker Architecture Object-oriented development Distributed-object computing
5
The Object Management Group Controls the CORBA standard Provides a specification for CORBA
6
CORBA Architecture Object Management Architecture –Object Request Broker –Object services –Common facilities –Application objects –Internet InterORB Protocol –Interface Definition Language –Object adapters –CORBA Services
7
Object Request Broker
8
Internet InterORB Protocol
9
Interface Definition Language
10
Summary Describe the role of CORBA in developing enterprise applications Describe the role of the Object Management Group Describe the CORBA architecture
11
Copyright © 2003 ProsoftTraining. All rights reserved. Lesson 2: Interface Definition Language
12
Objectives Use the IDL to define the interface to CORBA objects Describe the mapping of IDL nonclass data types into Java Describe the purpose of IDL parameter- passing modes Model inheritance using IDL Define CORBA exceptions using IDL
13
Introduction to IDL IDL files IDL compilers Mapping IDL to Java
14
Basics of IDL IDL constructs –Modules –Interfaces –Attributes –Operations
15
IDL Primitives IDLJava boolean char, wcharchar octetbyte string, wstringjava.lang.String short, unsigned shortshort long, unsigned longint long long, unsigned long longlong float double
16
Inheritance and IDL Java no multiple inheritance support Java class can inherit from only one other class IDL can be used to define an interface that inherits from multiple super-interfaces
17
Nonclass Data Types Constants Enumerations Unions Structures Type definitions Sequences Arrays
18
Parameter-Passing Modes and Exceptions Parameter-passing modes –in –out –inout Exceptions –Use-defined exceptions inherit indirectly from java.lang.Exception –IDL operations must declare their ability to raise an exception
19
Summary Use the IDL to define the interface to CORBA objects Describe the mapping of IDL nonclass data types into Java Describe the purpose of IDL parameter- passing modes Model inheritance using IDL Define CORBA exceptions using IDL
20
Copyright © 2003 ProsoftTraining. All rights reserved. Lesson 3: Building CORBA Clients
21
Objectives Use the IDL compiler to generate client stubs Initialize the ORB Use the naming service to obtain an object reference Invoke remote methods Use out and inout parameters to invoke remote methods
22
Client IDL Stubs Used to create client applications IDL-to-Java compiler named idlj –Used to compile IDL files to generate client stubs and server skeletons
23
Initializing the ORB The ORB class –Is used to initialize the ORB –Is not instantiated using its public constructor –Provides a static method named init that initializes the ORB and returns an instance of the ORB class
24
Using the Naming Service Connecting to the naming service Using the naming service to obtain an object reference –Obtaining the initial naming context –Retrieving an object reference
25
Example of Namespace
26
Invoking Remote Methods Remote methods are invoked in the same way that local methods are invoked
27
Using Out and Inout Parameters Out parameters –Used exclusively to return data from the server to the client Inout parameters –Passed both from the client to the server and, following any changes, from the server back to the client
28
Summary Use the IDL compiler to generate client stubs Initialize the ORB Use the naming service to obtain an object reference Invoke remote methods Use out and inout parameters to invoke remote methods
29
Copyright © 2003 ProsoftTraining. All rights reserved. Lesson 4: Building CORBA Servers
30
Objectives Use the IDL compiler to generate server skeletons Implement CORBA objects Initialize the ORB and wait for clients Use the naming service to publish an object reference Use out and inout parameters
31
Server IDL Skeletons A server skeleton provides a framework for the implementation of a CORBA object
32
Implementing CORBA Objects Server-side implementation
33
Using the Naming Service Instantiating a CORBA object Creating additional naming contexts
34
Example of Naming Service
35
Waiting for Invocation The wait method –Called to pause the main thread of execution –Part of Java’s built-in threading facilities
36
Using Out and Inout Parameters Out parameters –Used exclusively to return data from the server to the client Inout parameters –Passed both from the client to the server and, following any changes, from the server back to the client
37
Summary Use the IDL compiler to generate server skeletons Implement CORBA objects Initialize the ORB and wait for clients Use the naming service to publish an object reference Use out and inout parameters
38
Copyright © 2003 ProsoftTraining. All rights reserved. Lesson 5: Factory and Callback Objects
39
Objectives Describe the purpose of factory objects Use factory objects to obtain object references Describe the purpose of callback objects Develop applications that use callback objects
40
Factory Objects Types include: –Generic –Specific –In-process –Out-process FactoryFinder Using factory objects Designing factory objects
41
Callback Objects Using callback objects Designing callback objects
42
Summary Describe the purpose of factory objects Use factory objects to obtain object references Describe the purpose of callback objects Develop applications that use callback objects
43
Copyright © 2003 ProsoftTraining. All rights reserved. Lesson 6: CORBA Exceptions
44
Objectives Describe the purpose of CORBA exceptions Define an exception using IDL Develop CORBA objects that throw exceptions
45
Introduction to CORBA Exceptions Throwing CORBA exceptions Catching CORBA exceptions
46
Summary Describe the purpose of CORBA exceptions Define an exception using IDL Develop CORBA objects that throw exceptions
47
Copyright © 2003 ProsoftTraining. All rights reserved. Lesson 7: Dynamic Invocation Interface
48
Objectives Describe the purpose of the interface repository Describe the Dynamic Invocation Interface Construct an argument list for use in dynamic invocation Invoke a request using the DII Extract a return value following dynamic invocation
49
Dynamic Invocation Interface Introduction DII allows a client to access any CORBA object even though it may not have a client stub to provide a compile-time definition of an object’s interface
50
Invoking a Remote Method Using DII Construct a list of arguments Prepare a place to hold a return value Invoke the remote method Extract the return value
51
Summary Describe the purpose of the interface repository Describe the Dynamic Invocation Interface Construct an argument list for use in dynamic invocation Invoke a request using the DII Extract a return value following dynamic invocation
52
Distributed Object Computing Using Java and CORBA Introduction to CORBA Interface Definition Language Building CORBA Clients Building CORBA Servers Factory and Callback Objects CORBA Exceptions Dynamic Invocation Interface
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.