implementation of this specifi cation constitutes an ORB (Object Request Broker)
and there are several such implementations currently available on the market. Java
IDL (Interface Defi nition Language) is the ORB that constitutes one of the core
packages of the Java SE (from J2SE 1.2 upwards) and is the ORB that will be used
for all the examples in this chapter. Whereas RMI ORBs use a protocol called JRMP
(Java Remote Method Protocol), CORBA ORBs use IIOP (Internet Inter-Orb
Protocol), which is based on TCP/IP. It is IIOP that provides interoperability
between ORBs from different vendors.
Another fundamental difference between RMI and CORBA is that, whereas RMI
uses Java to defi ne the interfaces for its objects, CORBA uses a special language
called Interface Defi nition Language (IDL) to defi ne those interfaces. Although
this language has syntactic similarities to C++, it is not a full-blown programming
language. In order for any ORB to provide access to software objects in a particular
programming language, the ORB has to provide a mapping from the IDL to the
target language. Mappings currently specifi ed include ones for Java, C++, C,
Smalltalk, COBOL and Ada.
At the client end of a CORBA interaction, there is a code stub for each method
that is to be called remotely. This stub acts as a proxy (a 'stand-in') for the remote
method. At the server end, there is skeleton code that also acts as a proxy for the
required method and is used to translate the incoming method call and any param-
eters into their implementation-specifi c format, which is then used to invoke the
method implementation on the associated object. Method invocation passes through
the stub on the client side, then through the ORB and fi nally through the skeleton on
the server side, where it is executed on the object. For a client and server using the
same ORB, Fig. 6.1 shows the process.
Fig. 6.1 Remote method
invocation when client and
server are using the same
Figure 6.2 shows the same interaction for client and server processes operating
on different ORBs.
The Structure of a Java IDL Specifi cation
Java IDL includes an OMG-compliant version of the IDL and the corresponding
mapping from this IDL into Java. Some unnecessary confusion is caused by the
name Java IDL , which seems to imply that the product comprises just an IDL.