2 #include "tao/ORB_Core.h"
3 #include "tao/ORB_Table.h"
4 #include "tao/ORB_Core_Auto_Ptr.h"
6 Hello::Hello (CORBA::ORB_ptr orb
,
8 : orb_ (CORBA::ORB::_duplicate (orb
))
17 "(%P|%t) onewayTest() Upcall in process ..\n"));
25 "(%P|%t) Upcall in process ..\n"));
27 // Use portable thread IDs
28 ACE_Thread_ID self_ID
;
29 ACE_Thread_ID this_ID
;
30 this_ID
.id(this->thr_id_
);
32 if (self_ID
== this_ID
)
34 if (this->orb_
->orb_core ()->optimize_collocation_objects () &&
35 this->orb_
->orb_core ()->use_global_collocation ())
38 "(%P|%t) ERROR: A remote call has been made "
42 else if (this->orb_
->orb_core ()->optimize_collocation_objects () &&
43 this->orb_
->orb_core ()->use_global_collocation () == 0)
45 TAO::ORB_Table
* const orb_table
=
46 TAO::ORB_Table::instance ();
48 TAO_ORB_Core_Auto_Ptr
tmp (orb_table
->find ("server_orb"));
49 if (tmp
.get () == nullptr)
51 // We are running on a single ORB and this is an error.
53 "(%P|%t) ERROR: A remote call has been made "
61 return CORBA::string_dup ("Hello there!");
67 this->orb_
->shutdown (false);