An object reference is an object name that reliably denotes a particular object. Specifically, an object reference will identify the same object each time the reference is used in a request (subject to certain pragmatic limits of space and time). An object may be denoted by multiple, distinct object references.
An object reference specifies an instance of an object, either local or remote, through its object ID. An object reference specifically encapsulates an object ID.
An object ID is a unique identifier for an instance of CORBA object. It establishes the object's core identity. Whenever a client requests operations on a CORBA object or server implements functionality for a CORBA object, it is doing so for an object with a particular object ID. A CORBA object corresponds to its object ID. The application is responsible for assigning object IDs.
A client uses an object reference to invoke methods on a CORBA object. There can be more than one object reference to the same CORBA object. However, an object reference always refers to only one CORBA object which has a unique object ID.
Object references are created either by instantiating a class definition, which creates an object, or by duplicating an existing object.
Once created, object references can be used in various ways:
Object reference can be obtained through various methods. Some of these methods are:
StockPortfolio_ptr pPortfolio = new StockPortfolio( );
Each IDL interface defined maps to a class with the same name; for example, an interface StockPortfolio maps to a class StockPortfolio.