Previous Table of Contents Next


11.2.4 Reference Creation


   Object references are created in servers. Once they are created, they may be exported to clients.

   From this model’s perspective, object references encapsulate object identity information and information required by the ORB to identify and locate the server and POA with which the object is associated (that is, in whose scope the reference was created.) References are created in the following ways:

   • The server application may directly create a reference with the create_reference and create_reference_with_id operations on a POA object. These operations collect the necessary information to constitute the reference, either from

   information associated with the POA or as parameters to the operation. These

   operations only create a reference. In doing so, they bring the abstract object into

   existence, but do not associate it with an active servant.

   Once a reference is created in the server, it can be made available to clients in a variety of ways. It can be advertised through the OMG Naming and Trading Services. It can be converted to a string via ORB::object_to_string and published in some way that allows the client to discover the string and convert it to a reference using ORB::string_to_object. It can be returned as the result of an operation invocation.

   Once a reference becomes available to a client, that reference constitutes the identity of the object from the client’s perspective. As long as the client program holds and uses that reference, requests made on the reference should be sent to the “same? object.

   Note – The meaning of object identity and “sameness? is at present the subject of debate in the OMG. This specification does not attempt to resolve that debate in any way, particularly by defining a concrete notion of identity that is exposed to clients, beyond the existing notions of identity described in the CORBA specifications and the OMA guide.

   The states of servers and implementation objects are opaque to clients. This specification deals primarily with the view of the ORB from the server’s perspective.