Developing Component Software with CORBA > 2 Quick Start Tutorial > 2.2 Complete source code for the Hello World example

NextPrevUpTopContentsIndex

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

NextPrevUpTopContentsIndex