1 #include "Receiver_Factory.h"
4 Receiver_Factory::Receiver_Factory (CORBA::ORB_ptr orb
)
5 : orb_ (CORBA::ORB::_duplicate (orb
))
10 Receiver_Factory::create_receiver ()
12 Receiver
*receiver_impl
= 0;
13 ACE_NEW_THROW_EX (receiver_impl
,
16 PortableServer::ServantBase_var
transfer_ownership(receiver_impl
);
18 CORBA::Object_var poa_object
=
19 this->orb_
->resolve_initial_references("RootPOA");
21 PortableServer::POA_var root_poa
=
22 PortableServer::POA::_narrow (poa_object
.in ());
24 PortableServer::ObjectId_var id
=
25 root_poa
->activate_object (receiver_impl
);
27 CORBA::Object_var object
= root_poa
->id_to_reference (id
.in ());
29 return Test::Receiver::_narrow (object
.in ());
33 Receiver_Factory::shutdown ()
35 this->orb_
->shutdown (false);