diff options
Diffstat (limited to 'TAO/tests/DII_Collocation_Tests/oneway/Client_Task.cpp')
-rw-r--r-- | TAO/tests/DII_Collocation_Tests/oneway/Client_Task.cpp | 60 |
1 files changed, 22 insertions, 38 deletions
diff --git a/TAO/tests/DII_Collocation_Tests/oneway/Client_Task.cpp b/TAO/tests/DII_Collocation_Tests/oneway/Client_Task.cpp index f4a02e95052..7d2fd9d39c0 100644 --- a/TAO/tests/DII_Collocation_Tests/oneway/Client_Task.cpp +++ b/TAO/tests/DII_Collocation_Tests/oneway/Client_Task.cpp @@ -32,10 +32,10 @@ Client_Task::Client_Task (const char *ior, int Client_Task::svc (void) { - ACE_TRY_NEW_ENV + try { CORBA::Object_var obj = - this->corb_->string_to_object (input_ ACE_ENV_ARG_PARAMETER); + this->corb_->string_to_object (input_); if (CORBA::is_nil (obj.in ())) { @@ -46,7 +46,7 @@ Client_Task::svc (void) } CORBA::Object_var simple_test_obj = - this->corb_->string_to_object (simple_test_input_ ACE_ENV_ARG_PARAMETER); + this->corb_->string_to_object (simple_test_input_); if (CORBA::is_nil (simple_test_obj.in ())) { @@ -57,22 +57,20 @@ Client_Task::svc (void) } Test::Simple_Test_var simple_test - = Test::Simple_Test::_narrow (simple_test_obj.in () ACE_ENV_ARG_PARAMETER); + = Test::Simple_Test::_narrow (simple_test_obj.in ()); - CORBA::Request_var req (obj->_request ("test_basic_arg" ACE_ENV_ARG_PARAMETER)); + CORBA::Request_var req (obj->_request ("test_basic_arg")); req->add_in_arg ("basic") <<= TEST_BASIC_VALUE; req->send_oneway (); - req = obj->_request ("test_unbounded_string_arg" - ACE_ENV_ARG_PARAMETER); + req = obj->_request ("test_unbounded_string_arg"); req->add_in_arg ("ub_string") <<= TEST_STR; req->send_oneway (); - req = obj->_request ("test_bounded_string_arg" - ACE_ENV_ARG_PARAMETER); + req = obj->_request ("test_bounded_string_arg"); ACE_CString bs (TEST_STR); bs = bs.substr (0, ::Test::BOUNDED_STRING_SIZE); @@ -82,8 +80,7 @@ Client_Task::svc (void) req->send_oneway (); - req = obj->_request ("test_fixed_array_arg" - ACE_ENV_ARG_PARAMETER); + req = obj->_request ("test_fixed_array_arg"); ::Test::Fixed_Array fixed_array; @@ -96,8 +93,7 @@ Client_Task::svc (void) req->send_oneway (); - req = obj->_request ("test_var_array_arg" - ACE_ENV_ARG_PARAMETER); + req = obj->_request ("test_var_array_arg"); ::Test::Var_Array var_array; @@ -110,8 +106,7 @@ Client_Task::svc (void) req->send_oneway (); - req = obj->_request ("test_bounded_var_size_arg" - ACE_ENV_ARG_PARAMETER); + req = obj->_request ("test_bounded_var_size_arg"); ACE_CString bvs (TEST_STR); bvs = bvs.substr (0, ::Test::BOUNDED_VAR_SIZE); @@ -126,8 +121,7 @@ Client_Task::svc (void) req->send_oneway (); - req = obj->_request ("test_unbounded_var_size_arg" - ACE_ENV_ARG_PARAMETER); + req = obj->_request ("test_unbounded_var_size_arg"); ::Test::Unbounded_Var_Size_Arg* ub_var_size = new ::Test::Unbounded_Var_Size_Arg(); @@ -139,8 +133,7 @@ Client_Task::svc (void) req->send_oneway (); - req = obj->_request ("test_fixed_size_arg" - ACE_ENV_ARG_PARAMETER); + req = obj->_request ("test_fixed_size_arg"); ::Test::TimeOfDay t; t.hour = TEST_HOUR; @@ -151,29 +144,25 @@ Client_Task::svc (void) req->send_oneway (); - req = obj->_request ("test_special_basic_arg" - ACE_ENV_ARG_PARAMETER); + req = obj->_request ("test_special_basic_arg"); req->add_in_arg ("special") <<= CORBA::Any::from_char (TEST_SPECIAL_VALUE); req->send_oneway (); - req = obj->_request ("test_object_arg" - ACE_ENV_ARG_PARAMETER); + req = obj->_request ("test_object_arg"); req->add_in_arg ("object") <<= simple_test_obj.in (); req->send_oneway (); - req = obj->_request ("test_objref_arg" - ACE_ENV_ARG_PARAMETER); + req = obj->_request ("test_objref_arg"); req->add_in_arg ("objref") <<= simple_test.in (); req->send_oneway (); - req = obj->_request ("test_args_1" - ACE_ENV_ARG_PARAMETER); + req = obj->_request ("test_args_1"); req->add_in_arg ("arg1") <<= simple_test_obj.in (); req->add_in_arg ("arg2") <<= CORBA::Any::from_char (TEST_SPECIAL_VALUE); @@ -181,8 +170,7 @@ Client_Task::svc (void) req->send_oneway (); - req = obj->_request ("test_args_2" - ACE_ENV_ARG_PARAMETER); + req = obj->_request ("test_args_2"); req->add_in_arg ("arg1") <<= TEST_STR; req->add_in_arg ("arg2") <<= ::Test::Fixed_Array_forany (fixed_array); @@ -190,8 +178,7 @@ Client_Task::svc (void) req->send_oneway (); - req = obj->_request ("test_args_3" - ACE_ENV_ARG_PARAMETER); + req = obj->_request ("test_args_3"); bd_var_size = new ::Test::Bounded_Var_Size_Arg(); @@ -218,27 +205,24 @@ Client_Task::svc (void) req->send_oneway (); - req = obj->_request ("shutdown" - ACE_ENV_ARG_PARAMETER); + req = obj->_request ("shutdown"); req->send_oneway (); } - ACE_CATCHANY + catch (const CORBA::Exception& ex) { error_count_ ++; - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Exception caught:"); + ex._tao_print_exception ("Exception caught:"); return 1; } - ACE_CATCHALL + catch (...) { error_count_ ++; ACE_ERROR ((LM_ERROR, "(%P|%t)Client_Task::svc - caught unknown exception \n")); return 1; } - ACE_ENDTRY; return 0; |