Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / tests / POA / Forwarding / test_i.cpp
blobdd47e8a2326ac42534fdbad15305b90e510785a2
1 #include "test_i.h"
2 #include "Servant_Activator.h"
4 // Constructor
5 test_i::test_i (CORBA::ORB_ptr orb,
6 PortableServer::POA_ptr poa,
7 ServantActivator &activator,
8 CORBA::Long value)
9 : orb_ (CORBA::ORB::_duplicate (orb)),
10 poa_ (PortableServer::POA::_duplicate (poa)),
11 activator_ (activator),
12 value_ (value)
16 CORBA::Long
17 test_i::doit ()
19 return this->value_++;
22 void
23 test_i::forward ()
25 this->activator_.forward_requests ();
27 PortableServer::ObjectId_var id =
28 this->poa_->servant_to_id (this);
30 this->poa_->deactivate_object (id.in ());
34 void
35 test_i::shutdown ()
37 this->orb_->shutdown (false);
40 PortableServer::POA_ptr
41 test_i::_default_POA ()
43 return PortableServer::POA::_duplicate (this->poa_.in ());