Next Prev Up Top Contents Index

2.2.5 The complete Hello World server source code

The complete code for the Hello World server (the hello-world-server.lisp file) is:

(in-package "CL-USER") (defclass world-implementation (HelloWorld:world-servant) ())
(corba:define-method op:hello ((self world-implementation))
  (declare (ignore self))
  "Hello World!")
(defun server-startup ()
  (let* ((orb (op:orb_init nil "LispWorks ORB"))
         (poa (op:resolve_initial_references orb "RootPOA"))
         (impl (make-instance 'world-implementation))
         (world (op:narrow 'HelloWorld:world
                           (op:servant_to_reference poa impl))))
    (object-to-file orb world)
    (let ((manager (op:the_poamanager poa)))
      (op:activate manager))))

 


Developing Component Software with CORBA - 14 Dec 2001

Next Prev Up Top Contents Index