2 #include "ace/OS_NS_unistd.h"
3 #include "tao/ORB_Core.h"
4 #include "tao/RTCORBA/Thread_Pool.h"
6 test_i::test_i (CORBA::ORB_ptr orb
,
7 PortableServer::POA_ptr poa
,
9 : orb_ (CORBA::ORB::_duplicate (orb
)),
10 poa_ (PortableServer::POA::_duplicate (poa
)),
13 this->nap_time_
.msec (msec_sleep
);
17 test_i::method (CORBA::Long client_id
,
18 CORBA::Long iteration
)
20 // Get the ORB_Core's TSS resources.
21 TAO_ORB_Core_TSS_Resources
*tss
=
22 this->orb_
->orb_core ()->get_tss_resources ();
24 /// Get the lane attribute in TSS.
25 TAO_Thread_Lane
*lane
=
26 static_cast <TAO_Thread_Lane
*> (tss
->lane_
);
30 "Request in thread %t (pool id = %d; lane id = %d) for client %d iteration %d\n",
37 "Request in thread %t (default thread pool) for client %d iteration %d\n",
41 ACE_OS::sleep (this->nap_time_
);
46 PortableServer::POA_ptr
47 test_i::_default_POA (void)
49 return PortableServer::POA::_duplicate (this->poa_
.in ());
53 test_i::shutdown (void)
55 this->orb_
->shutdown (0);