Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / tests / Bug_2503_Regression / test_i.cpp
blobbcfdff9816f5e48d6a4d0494f43580514ab1e239
1 #include "test_i.h"
3 test_i::
4 test_i(CORBA::ORB_ptr orb)
6 this->orb_ = CORBA::ORB::_duplicate (orb);
9 void test_i::
10 the_operation(CORBA::Long & x)
12 x = 42;
15 char *
16 test_i::
17 create_and_activate_server()
19 PortableServer::Servant_var<test_i> impl(
20 new test_i (this->orb_.in ()));
22 CORBA::Object_var poa_object =
23 this->orb_->resolve_initial_references("RootPOA");
25 PortableServer::POA_var root_poa =
26 PortableServer::POA::_narrow (poa_object.in ());
28 PortableServer::ObjectId_var id =
29 root_poa->activate_object (impl.in ());
31 CORBA::Object_var object = root_poa->id_to_reference (id.in ());
33 Test_var ref = Test::_narrow (object.in ());
35 return this->orb_->object_to_string(ref.in());
38 void
39 test_i::shutdown (void)
41 if (!CORBA::is_nil (this->orb_.in ()))
42 this->orb_->shutdown (0);