Developing Component Software with CORBA > 2 Quick Start Tutorial > 2.1 A CORBA-based Hello World


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 (example-file "corba/hello-world/defsys"))
    (compile-system "HELLO-WORLD-CORBA-OBJECT"
                    :t-dir (get-temp-directory)
                    :load t)

    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 - 22 Dec 2009