40 likes | 163 Views
HelloWorld Revisit. Review HelloWorld Example Idl Generated files Why separate GoodDay and GoodDayOperations Operations may not want to extend from org.omg.CORBA.Object Relationship among generated classes. InterfaceNameOperations. org.omg.CORBA.Object. Org.omg.CORBA.portable.ObjectImpl.
E N D
HelloWorld Revisit • Review HelloWorld Example • Idl • Generated files • Why separate GoodDay and GoodDayOperations • Operations may not want to extend from org.omg.CORBA.Object • Relationship among generated classes InterfaceNameOperations org.omg.CORBA.Object Org.omg.CORBA.portable.ObjectImpl InterfaceName _InterfaceNameStub ORB Runtime
HelloWorld Revisit • Initializing the ORB • ORB as pseudo-object • Methods provided by a library in communication with the run-time system • Its reference cannot be passed as a parameter to CORBA interface operations. • Reference to an ORB looks like other object reference • ORB orb = ORB.init(args, null) returns an instance of an ORB • Client implementation • Initialize ORB • Get obj reference • Make call on the object (like a local call) • Compile • Execute: programName, parameter (the object reference) ORB Runtime
HelloWorld Revisit • Initializing the ORB • ORB as pseudo-object • Methods provided by a library in communication with the run-time system • Its reference cannot be passed as a parameter to CORBA interface operations. • Reference to an ORB looks like other object reference • ORB orb = ORB.init(args, null) returns an instance of an ORB • Server implementation • Servant • Example GoodDayImp • Server implementation • Initialize orb • get POA • Activate POA • Get a servant • Covert a servant to a CORBA object reference ORB Runtime
HelloWorld Revisit • Initializing the ORB • ORB as pseudo-object • Methods provided by a library in communication with the run-time system • Its reference cannot be passed as a parameter to CORBA interface operations. • Reference to an ORB looks like other object reference • ORB orb = ORB.init(args, null) returns an instance of an ORB • Server implementation • Servant • Example GoodDayImp • Server implementation • Initialize orb • get POA • Activate POA • Get a servant • Covert a servant to a CORBA object reference ORB Runtime