1 / 52

Distributed Object Computing Using Java and CORBA

Distributed Object Computing Using Java and CORBA. Lesson 1: Introduction to CORBA. Objectives. Describe the role of CORBA in developing enterprise applications Describe the role of the Object Management Group Describe the CORBA architecture. CORBA Overview.

bailey
Download Presentation

Distributed Object Computing Using Java and CORBA

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Distributed Object Computing Using Java and CORBA

  2. 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. CORBAOverview • Common Object Request Broker Architecture • Object-oriented development • Distributed-object computing

  5. The ObjectManagement Group • Controls the CORBA standard • Provides a specification for CORBA

  6. CORBAArchitecture • Object Management Architecture • Object Request Broker • Object services • Common facilities • Application objects • Internet InterORB Protocol • Interface Definition Language • Object adapters • CORBA Services

  7. ObjectRequest Broker

  8. InternetInterORB Protocol

  9. InterfaceDefinition 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. 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. Basicsof IDL • IDL constructs • Modules • Interfaces • Attributes • Operations

  15. IDLPrimitives

  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. Constants Enumerations Unions Structures Type definitions Sequences Arrays NonclassData Types

  18. Parameter-PassingModes 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. 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 theNaming 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 ofNamespace

  26. InvokingRemote Methods • Remote methods are invoked in the same way that local methods are invoked

  27. Using Out andInout 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. 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. ServerIDL Skeletons • A server skeleton provides a framework for the implementation of a CORBA object

  32. ImplementingCORBA Objects Server-side implementation

  33. Using theNaming Service • Instantiating a CORBA object • Creating additional naming contexts

  34. Example ofNaming Service

  35. Waitingfor Invocation • The wait method • Called to pause the main thread of execution • Part of Java’s built-in threading facilities

  36. Using Out andInout 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. Lesson 5:Factory andCallback 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. FactoryObjects • Types include: • Generic • Specific • In-process • Out-process • FactoryFinder • Using factory objects • Designing factory objects

  41. CallbackObjects • 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. 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. Lesson 7:DynamicInvocation 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 InvocationInterface 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 RemoteMethod Using DII • Construct a list of arguments • Prepare a place to hold a return value • Invoke the remote method • Extract the return value

More Related