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
))
14 Hello::onewayTest (void)
17 "(%P|%t) onewayTest() Upcall in process ..\n"));
23 Hello::get_string (void)
26 "(%P|%t) Upcall in process ..\n"));
28 // Use portable thread IDs
29 ACE_Thread_ID self_ID
;
30 ACE_Thread_ID this_ID
;
31 this_ID
.id(this->thr_id_
);
33 if (self_ID
== this_ID
)
35 if (this->orb_
->orb_core ()->optimize_collocation_objects () &&
36 this->orb_
->orb_core ()->use_global_collocation ())
39 "(%P|%t) ERROR: A remote call has been made "
43 else if (this->orb_
->orb_core ()->optimize_collocation_objects () &&
44 this->orb_
->orb_core ()->use_global_collocation () == 0)
46 TAO::ORB_Table
* const orb_table
=
47 TAO::ORB_Table::instance ();
49 TAO_ORB_Core_Auto_Ptr
tmp (orb_table
->find ("server_orb"));
52 // We are running on a single ORB and this is an error.
54 "(%P|%t) ERROR: A remote call has been made "
62 return CORBA::string_dup ("Hello there!");
66 Hello::shutdown (void)
68 this->orb_
->shutdown (0);