Changes to attempt to silence bcc64x
[ACE_TAO.git] / TAO / performance-tests / Throughput / Receiver_Factory.cpp
blobb67eb3418a8d67c2f61db602497b86e579966033
1 #include "Receiver_Factory.h"
2 #include "Receiver.h"
4 Receiver_Factory::Receiver_Factory (CORBA::ORB_ptr orb)
5 : orb_ (CORBA::ORB::_duplicate (orb))
9 Test::Receiver_ptr
10 Receiver_Factory::create_receiver ()
12 Receiver *receiver_impl = 0;
13 ACE_NEW_THROW_EX (receiver_impl,
14 Receiver,
15 CORBA::NO_MEMORY ());
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 ());
32 void
33 Receiver_Factory::shutdown ()
35 this->orb_->shutdown (false);