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
,
19 CORBA::Long_out thread_count
)
21 // Get the ORB_Core's TSS resources.
22 TAO_ORB_Core_TSS_Resources
*tss
=
23 this->orb_
->orb_core ()->get_tss_resources ();
25 /// Get the lane attribute in TSS.
26 TAO_Thread_Lane
*lane
=
27 static_cast <TAO_Thread_Lane
*> (tss
->lane_
);
31 "Request in thread %t (pool id = %d; lane id = %d) for client %d iteration %d\n",
38 "Request in thread %t (default thread pool) for client %d iteration %d\n",
42 ACE_OS::sleep (this->nap_time_
);
45 thread_count
= lane
->current_threads ();
52 PortableServer::POA_ptr
53 test_i::_default_POA (void)
55 return PortableServer::POA::_duplicate (this->poa_
.in ());
59 test_i::shutdown (void)
61 this->orb_
->shutdown (0);