Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / tests / POA / Forwarding / Servant_Activator.cpp
blob2c107d098947fe455377158a3c2439b6bdb980a9
1 #include "Servant_Activator.h"
2 #include "test_i.h"
4 ServantActivator::ServantActivator (CORBA::ORB_ptr orb,
5 CORBA::Object_ptr forward_to)
6 : orb_ (CORBA::ORB::_duplicate (orb)),
7 forward_to_ (CORBA::Object::_duplicate (forward_to))
11 PortableServer::Servant
12 ServantActivator::incarnate (const PortableServer::ObjectId &,
13 PortableServer::POA_ptr)
15 this->orb_->shutdown (false);
17 // Throw forward exception
18 throw PortableServer::ForwardRequest (this->forward_to_.in ());
21 void
22 ServantActivator::etherealize (const PortableServer::ObjectId &,
23 PortableServer::POA_ptr,
24 PortableServer::Servant servant,
25 CORBA::Boolean,
26 CORBA::Boolean)
28 delete servant;
31 void
32 ServantActivator::forward_requests ()
34 if (CORBA::is_nil (this->forward_to_.in ()))
35 throw test::Cannot_Forward ();