Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / tests / Collocation_Tests / Client_Task.cpp
blob8352825f76603b99491e6f67277dd66b7bebd46b
2 #include "Client_Task.h"
3 #include "TestC.h"
5 Client_Task::Client_Task (const ACE_TCHAR *ior,
6 CORBA::ORB_ptr corb,
7 ACE_Thread_Manager *thr_mgr)
8 : ACE_Task_Base (thr_mgr)
9 , input_ (ior)
10 , corb_ (CORBA::ORB::_duplicate (corb))
15 int
16 Client_Task::svc ()
18 try
20 CORBA::Object_var tmp =
21 this->corb_->string_to_object (input_);
23 Test::Hello_var hello =
24 Test::Hello::_narrow(tmp.in ());
26 if (CORBA::is_nil (hello.in ()))
28 ACE_ERROR_RETURN ((LM_DEBUG,
29 "Nil Test::Hello reference <%s>\n",
30 input_),
31 1);
34 CORBA::String_var the_string =
35 hello->get_string ();
37 ACE_DEBUG ((LM_DEBUG, "(%P|%t) - string returned <%C>\n",
38 the_string.in ()));
40 hello->shutdown ();
42 catch (const CORBA::Exception& ex)
44 ex._tao_print_exception ("Exception caught:");
45 return 1;
48 return 0;