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:
(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 4.1 Windows NT installation, you would specify:
(load "C:\\Program Files\\Xanalys\\LispWorks\\lib\\
4-2-0-0\\examples\\corba\\hello-world\\defsys")
Now, you can run the application to test that it works.
(mp:initialize-multiprocessing)
You need to run the server first so that it is waiting and ready to receive calls from the client.
(cl-user::server-startup)
(cl-user::run-client)
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.