The following source is a implementation of the simple phone directory sample
supplied by DDJ's Ray Valdes. It was written by Charles Erickson, a developer
in the SOMObjects product group at IBM Austin, Texas.

This code was written in such a way as to allow the phonedir object to be
created either in the same process as the client program (main) or to be
distributed in a remote process without recompiling the client application.
The location of the object is determined by its registration in the SOM
Implementation Repository. Without changing the client program, the user can
update the Implementation Repository and specify whether the phonedir
object is to be local or remote and, if remote, on which network host the
phonedir object should be created.

As a result of providing this flexibility in the location of the phonedir
object, there is some scaffolding or glue code designed to hide some of the
current seams in SOM's local/remote transparency. These seams are related to
memory management and object lifecycle.

In subsequent releases of the SOMobjects Toolkit, this scaffolding code will
be absorbed behind the CORBA lifecycle and seamless memory management API's.
As a result, new applications can take advantage of complete local/remote
transparency while applications written to the old APIs will continue to work
unchanged.

Only the Interface Definition Language (IDL) file, the phonedir object source
and the main client source are required. The appropriate header file
(PhoneDir.pxh) is generated automatically when the IDL file is run through
the SOM compiler. The SOM compiler also generates a template for the
phonedir code. The code in the phonedir object that was automatically
generated by the SOM compile is displayed in bold text.

