1 / 14

Outline

Outline. CORBA Programming Elements Server & Client Basics IDL Compiler CORBA Naming Service Utilities Demo. CORBA Programming Elements. Object Request Broker (ORB) Interoperable Object Reference (IOR) Object Adapters Client Servant (Implementation). Conceptual view of ORB.

perry
Download Presentation

Outline

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. Outline • CORBA Programming Elements • Server & Client Basics • IDL Compiler • CORBA Naming Service • Utilities • Demo

  2. CORBA Programming Elements • Object Request Broker (ORB) • Interoperable Object Reference (IOR) • Object Adapters • Client • Servant (Implementation)

  3. Conceptual view of ORB

  4. Object Request Broker • provides all the communication infrastructure needed to identify and locate objects • lookup and instantiate objects on remote machines • handle connection management • deliver data and request communication • invoke methods on a remote object

  5. Interoperable Object Reference • Global identifier string • identifies the machine on which its associated object is located • the interface that the object supports • Examples IOR:000000000000001c49444c3a42616e6b2f4163636f756e744d616e616765723a312e3000000000010000000000000050000102000000000f3133372e3138392e38382e3137330000809b00000000002b00504d43000000040000000f2f62616e6b5f706f727461626c6500200000000b42616e6b4d616e616765720000000000

  6. Object Adapters • provides an interface between the ORB and the object implementation • Registration of server object implementations with the Implementation Repository • Mapping of object references to their implementations

  7. Server Basics • Steps for setting up server • Initialize the ORB • Create and Setup the POA • Activate the POA Manager • Creating and activating the objects • Wait for client requests

  8. Client Basics • Steps for setting up client • Initializing the ORB • Binding to objects • Invoking operations on an object

  9. IDL compiler • Examples IDL (Bank.idl): module Bank { interface Account { float balance(); }; interface AccountManager { Account open(in string name); }; }; • Usage : • idl2java Bank.idl

  10. Implementation • AccountImpl.java public class AccountImpl extends Bank.AccountPOA { public AccountImpl(float balance) { _balance = balance; } public float balance() { return _balance; } private float _balance; }

  11. Naming Service • bind a name to one of its objects • associate one or more logical names with an object reference • store logical names in a namespace • obtain an object reference by using the logical name assigned to that object

  12. Utilities • idl2java • osagent • nameserv • vbj • vbjc

  13. Run Sample • Starting Smart Agent if no osagent • osagent • Starting Naming Service • nameserv DEMO • Running Server • vbj -DSVCnameroot=DEMO Server • Running Client • vbj -DSVCnameroot=DEMO Client

  14. Demo

More Related