2.1.6 Building and testing the application

To build and test this distributed Hello World application, you must copy the rest of the source code from Complete source code for the Hello World example into the respective files. The code can also be found in the corba/hello-world subdirectory of the standard examples directory.

After supplementing your files with the complete source code, perform the following steps in the Listener to run the example:

  1. Load the defsystem file by entering:
  2. (load "defsys")
    (compile-system "HELLO-WORLD-CORBA-OBJECT" :load t)

    You may need to adjust the (load "defsys") command for your platform and/or provide a more precise location on your machine. For example, for a default LispWorks 5.0 installation on MS Windows, you would specify:

    (load "C:\\Program Files\\LispWorks\\lib\\5-0-0-0\\examples\\corba\\hello-world\\defsys")

    Now, you can run the application to test that it works.

  3. If you are using LispWorks on a UNIX platform and not running with multiprocessing enabled, then call:
  4. (mp:initialize-multiprocessing)

    You need to run the server first so that it is waiting and ready to receive calls from the client.

  5. Enter the command:
  6. (cl-user::server-startup)
  7. You can then run the client using:

Note that you do not have to be running the client and the server in the same Lisp image (although you can if desired). In the simple example we have just implemented, they must be running on the same machine (to allow the object reference to be shared using a single file), but we have true location transparency in the way the client can be written with no regard for the location of the server process.

Developing Component Software with CORBA - 24 Feb 2006