diff options
Diffstat (limited to 'TAO/performance-tests/Throughput/Receiver_Factory.cpp')
-rw-r--r-- | TAO/performance-tests/Throughput/Receiver_Factory.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/TAO/performance-tests/Throughput/Receiver_Factory.cpp b/TAO/performance-tests/Throughput/Receiver_Factory.cpp index f4dc0d95a4f..67d83c75843 100644 --- a/TAO/performance-tests/Throughput/Receiver_Factory.cpp +++ b/TAO/performance-tests/Throughput/Receiver_Factory.cpp @@ -13,7 +13,6 @@ Receiver_Factory::Receiver_Factory (CORBA::ORB_ptr orb) Test::Receiver_ptr Receiver_Factory::create_receiver (void) - ACE_THROW_SPEC ((CORBA::SystemException)) { Receiver *receiver_impl = 0; ACE_NEW_THROW_EX (receiver_impl, @@ -21,12 +20,22 @@ Receiver_Factory::create_receiver (void) CORBA::NO_MEMORY ()); PortableServer::ServantBase_var transfer_ownership(receiver_impl); - return receiver_impl->_this (); + CORBA::Object_var poa_object = + this->orb_->resolve_initial_references("RootPOA"); + + PortableServer::POA_var root_poa = + PortableServer::POA::_narrow (poa_object.in ()); + + PortableServer::ObjectId_var id = + root_poa->activate_object (receiver_impl); + + CORBA::Object_var object = root_poa->id_to_reference (id.in ()); + + return Test::Receiver::_narrow (object.in ()); } void Receiver_Factory::shutdown (void) - ACE_THROW_SPEC ((CORBA::SystemException)) { this->orb_->shutdown (0); } |