nn 1 | Page 21

514 DISTRIBUTED OBJECT-BASED SYSTEMS CHAP. 9
Instead, process A will first have to marshal the pointer into a process-independent representation. The operation to do so is provided by its ORB. Once marshaled, the reference can be passed to process B, which can unmarshal it again. Note that processes A and B may be executing programs written in different languages.
In contrast, the underlying ORB will have its own language-independent representation of an object reference. This representation may even differ from the marshaled version it hands over to processes that want to exchange a reference. The important thing is that when a process refers to an object, its underlying ORB is implicitly passed enough information to know which object is actually being referenced. Such information is normally passed by the client and serverside stubs that are generated from the IDL specifications of an object.
One of the problems that early versions of CORBA had was that each ORB could decide on how it represented an object reference. Consequently, if process A wanted to pass a reference to process B as described above, this would generally succeed only if both processes were executing on top of the same ORB. Otherwise, the marshaled version of the reference held by process A would be meaningless to the ORB underlying process B.
Current CORBA systems all support the same language-independent representation of an object reference, which is called Interoperable Object Reference or IOR. Whether or not an ORB uses IORs internally is not important. However, when passing an object reference between two different ORBs, it is passed as an IOR. An IOR contains all the information needed to identify an object. The general layout of an IOR is shown in Fig. 9-14, along with specific information for IIOP, which we next explain in detail.
Tagged Profile Interoperable Object Reference( IOR)
Repository identifier
Profile ID
Profile
IIOP version
Host Port Object key Components
POA identifier
Object identifier
Other serverspecific information
Figure 9-14. The organization of an IOR with specific information for IIOP.
Each IOR starts with a repository identifier. As we explained, this identifier is assigned to an interface when that interface is stored in the interface repository. It is used to retrieve information on an interface during runtime, and can assist in, for example, type checking or dynamically constructing an invocation. Note that if this identifier is to be useful, both the client and server must have access to the