Implementing The Servant (Cont.) And the class's implementation follows: // constructor - note that we need to use the _duplicate // method to make sure the poa's reference count is // increased. Forgetting this duplication might cause odd // runtime failures. Had we used a '_var' variable - that // wouldn't be necessary. HelloWorldImpl::HelloWorldImpl(PortableServer::POA_ptr poa) : myPoa (PortableServer::POA::_duplicate (poa)) { } // write a "hello world" message to the screen. void HelloWorldImpl::sayHello() { cout << "Hello World" << endl << flush; }