2 #include "Client_Task.h"
3 #include "tao/ORB_Core.h"
6 Client_Task::Client_Task (const ACE_TCHAR
*ior
,
8 ACE_Thread_Manager
*thr_mgr
,
10 : ACE_Task_Base (thr_mgr
)
12 , corb_ (CORBA::ORB::_duplicate (corb
))
22 CORBA::Object_var tmp
=
23 this->corb_
->string_to_object (input_
);
25 Test::Hello_var hello
=
26 Test::Hello::_narrow(tmp
.in ());
28 if (CORBA::is_nil (hello
.in ()))
30 ACE_ERROR_RETURN ((LM_DEBUG
,
31 "Nil Test::Hello reference <%s>\n",
36 CORBA::String_var the_string
=
40 "(%P|%t) - string returned <%C>\n",
45 // We would expect the call to fail, so we have an error now
46 ACE_ERROR ((LM_ERROR
, "(%P|%t) - ERROR: get_string should have failed\n"));
51 catch (const CORBA::TRANSIENT
& ex
)
55 ACE_DEBUG ((LM_DEBUG
, "(%P|%t) - caught expected exception\n"));
56 // When collocation has been disabled we expect a transient
61 ex
._tao_print_exception ("Caught exception:");
64 catch (const CORBA::Exception
& ex
)
66 ex
._tao_print_exception ("Exception caught:");