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::system_exception_test ()
16 throw CORBA::INTERNAL ();
20 Hello::user_exception_expected ()
22 throw ::Test::Hello::A ();
26 Hello::user_exception_not_expected ()
28 this->throw_internal_b ();
32 Hello::throw_internal_b ()
34 throw ::Test::Hello::B ();
41 "(%P|%t) Upcall in process ..\n"));
43 // Use portable thread IDs
44 ACE_Thread_ID self_ID
;
45 ACE_Thread_ID this_ID
;
46 this_ID
.id(this->thr_id_
);
48 if (self_ID
== this_ID
)
50 if (this->orb_
->orb_core ()->optimize_collocation_objects () &&
51 this->orb_
->orb_core ()->use_global_collocation ())
54 "(%P|%t) ERROR: A remote call has been made "
58 else if (this->orb_
->orb_core ()->optimize_collocation_objects () &&
59 this->orb_
->orb_core ()->use_global_collocation () == 0)
61 TAO::ORB_Table
* const orb_table
=
62 TAO::ORB_Table::instance ();
64 TAO_ORB_Core_Auto_Ptr
tmp (orb_table
->find ("server_orb"));
65 if (tmp
.get () == nullptr)
67 // We are running on a single ORB and this is an error.
69 "(%P|%t) ERROR: A remote call has been made "
77 return CORBA::string_dup ("Hello there!");
83 this->orb_
->shutdown (false);