diff options
Diffstat (limited to 'TAO/tests/Big_Request_Muxing')
-rw-r--r-- | TAO/tests/Big_Request_Muxing/Client_Task.cpp | 37 | ||||
-rw-r--r-- | TAO/tests/Big_Request_Muxing/Client_Task.h | 4 | ||||
-rw-r--r-- | TAO/tests/Big_Request_Muxing/Payload_Receiver.cpp | 6 | ||||
-rw-r--r-- | TAO/tests/Big_Request_Muxing/Payload_Receiver.h | 6 | ||||
-rw-r--r-- | TAO/tests/Big_Request_Muxing/client.cpp | 18 | ||||
-rw-r--r-- | TAO/tests/Big_Request_Muxing/server.cpp | 19 |
6 files changed, 39 insertions, 51 deletions
diff --git a/TAO/tests/Big_Request_Muxing/Client_Task.cpp b/TAO/tests/Big_Request_Muxing/Client_Task.cpp index fa7e0375eb1..c6bad09ef62 100644 --- a/TAO/tests/Big_Request_Muxing/Client_Task.cpp +++ b/TAO/tests/Big_Request_Muxing/Client_Task.cpp @@ -32,26 +32,26 @@ Client_Task::done(void) const } void -Client_Task::do_invocations(Test::Payload& payload ACE_ENV_SINGLE_ARG_DECL) +Client_Task::do_invocations(Test::Payload& payload) { ACE_DEBUG((LM_DEBUG, "(%P|%t)Client_Task %s sending %d payloads.\n", this->id_.c_str(), this->event_count_)); for (int i = 0; i != this->event_count_; ++i) { - this->payload_receiver_->more_data (payload ACE_ENV_ARG_PARAMETER); + this->payload_receiver_->more_data (payload); } } void -Client_Task::do_sync_none_invocations(Test::Payload& payload ACE_ENV_SINGLE_ARG_DECL) +Client_Task::do_sync_none_invocations(Test::Payload& payload) { ACE_DEBUG((LM_DEBUG, "(%P|%t)Client_Task %s sending %d SYNC_NONE payloads.\n", this->id_.c_str(), this->event_count_)); for (int i = 0; i != this->event_count_; ++i) { - this->payload_receiver_->sync_none_more_data (payload ACE_ENV_ARG_PARAMETER); + this->payload_receiver_->sync_none_more_data (payload); } } @@ -65,16 +65,14 @@ Client_Task::svc (void) for (CORBA::ULong j = 0; j != payload.length (); ++j) payload[j] = (j % 256); - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY + try { this->validate_connection (); CORBA::Object_var object = - this->orb_->resolve_initial_references ("PolicyCurrent" - ACE_ENV_ARG_PARAMETER); + this->orb_->resolve_initial_references ("PolicyCurrent"); CORBA::PolicyCurrent_var policy_current = - CORBA::PolicyCurrent::_narrow (object.in () ACE_ENV_ARG_PARAMETER); + CORBA::PolicyCurrent::_narrow (object.in ()); CORBA::Any scope_as_any; scope_as_any <<= this->sync_scope_; @@ -84,28 +82,25 @@ Client_Task::svc (void) policy_list.length (1); policy_list[0] = this->orb_->create_policy (Messaging::SYNC_SCOPE_POLICY_TYPE, - scope_as_any - ACE_ENV_ARG_PARAMETER); + scope_as_any); policy_current->set_policy_overrides (policy_list, - CORBA::ADD_OVERRIDE - ACE_ENV_ARG_PARAMETER); + CORBA::ADD_OVERRIDE); if (this->sync_scope_ == Messaging::SYNC_NONE) - this->do_sync_none_invocations(payload ACE_ENV_SINGLE_ARG_PARAMETER); + this->do_sync_none_invocations(payload); else - this->do_invocations(payload ACE_ENV_SINGLE_ARG_PARAMETER); + this->do_invocations(payload); } - ACE_CATCHANY + catch (const CORBA::Exception& ex) { ACE_DEBUG((LM_DEBUG, "(%P|%t)Client_Task %s: ", this->id_.c_str())); - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, ""); + ex._tao_print_exception (""); done_ = true; return -1; } - ACE_ENDTRY; ACE_DEBUG((LM_DEBUG, "(%P|%t)Client_Task %s finished.\n", this->id_.c_str())); done_ = true; return 0; @@ -114,13 +109,13 @@ Client_Task::svc (void) void Client_Task::validate_connection (void) { - ACE_TRY + try { Test::Payload payload(0); for (int i = 0; i != 100; ++i) { - (void) this->payload_receiver_->more_data (payload ACE_ENV_ARG_PARAMETER); + (void) this->payload_receiver_->more_data (payload); } } - ACE_CATCHANY {} ACE_ENDTRY; + catch (const CORBA::Exception& ex){} } diff --git a/TAO/tests/Big_Request_Muxing/Client_Task.h b/TAO/tests/Big_Request_Muxing/Client_Task.h index 239e12701ea..408d7458438 100644 --- a/TAO/tests/Big_Request_Muxing/Client_Task.h +++ b/TAO/tests/Big_Request_Muxing/Client_Task.h @@ -38,8 +38,8 @@ private: /// workaround bug 189 void validate_connection (void); - void do_invocations(Test::Payload& payload ACE_ENV_SINGLE_ARG_DECL); - void do_sync_none_invocations(Test::Payload& payload ACE_ENV_SINGLE_ARG_DECL); + void do_invocations(Test::Payload& payload); + void do_sync_none_invocations(Test::Payload& payload); private: /// Reference to the test interface diff --git a/TAO/tests/Big_Request_Muxing/Payload_Receiver.cpp b/TAO/tests/Big_Request_Muxing/Payload_Receiver.cpp index e3203f20359..917276b28f4 100644 --- a/TAO/tests/Big_Request_Muxing/Payload_Receiver.cpp +++ b/TAO/tests/Big_Request_Muxing/Payload_Receiver.cpp @@ -12,8 +12,7 @@ Payload_Receiver::Payload_Receiver () } void -Payload_Receiver::more_data (const Test::Payload& payload - ACE_ENV_ARG_DECL_NOT_USED) +Payload_Receiver::more_data (const Test::Payload& payload) ACE_THROW_SPEC ((CORBA::SystemException)) { if (payload.length() > 0) @@ -23,8 +22,7 @@ Payload_Receiver::more_data (const Test::Payload& payload } void -Payload_Receiver::sync_none_more_data (const Test::Payload& payload - ACE_ENV_ARG_DECL_NOT_USED) +Payload_Receiver::sync_none_more_data (const Test::Payload& payload) ACE_THROW_SPEC ((CORBA::SystemException)) { if (payload.length() > 0) diff --git a/TAO/tests/Big_Request_Muxing/Payload_Receiver.h b/TAO/tests/Big_Request_Muxing/Payload_Receiver.h index 130ebba266e..1aa87ca3735 100644 --- a/TAO/tests/Big_Request_Muxing/Payload_Receiver.h +++ b/TAO/tests/Big_Request_Muxing/Payload_Receiver.h @@ -19,12 +19,10 @@ public: Payload_Receiver (); // = The skeleton methods - virtual void more_data (const Test::Payload &payload - ACE_ENV_ARG_DECL) + virtual void more_data (const Test::Payload &payload) ACE_THROW_SPEC ((CORBA::SystemException)); - virtual void sync_none_more_data (const Test::Payload &payload - ACE_ENV_ARG_DECL) + virtual void sync_none_more_data (const Test::Payload &payload) ACE_THROW_SPEC ((CORBA::SystemException)); int count(bool sync_none = false) const; diff --git a/TAO/tests/Big_Request_Muxing/client.cpp b/TAO/tests/Big_Request_Muxing/client.cpp index b3ec79aac4b..5f9e816cf70 100644 --- a/TAO/tests/Big_Request_Muxing/client.cpp +++ b/TAO/tests/Big_Request_Muxing/client.cpp @@ -45,19 +45,19 @@ main (int argc, char *argv[]) { ACE_DEBUG ((LM_DEBUG, "(%P) Starting client\n")); - ACE_TRY_NEW_ENV + try { CORBA::ORB_var orb = - CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER); + CORBA::ORB_init (argc, argv, ""); if (parse_args (argc, argv) != 0) return 1; CORBA::Object_var tmp = - orb->string_to_object(ior ACE_ENV_ARG_PARAMETER); + orb->string_to_object(ior); Test::Payload_Receiver_var payload_receiver = - Test::Payload_Receiver::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER); + Test::Payload_Receiver::_narrow(tmp.in ()); if (CORBA::is_nil (payload_receiver.in ())) { @@ -107,7 +107,7 @@ main (int argc, char *argv[]) while (ACE_OS::gettimeofday() < end_time) { ACE_Time_Value tv (0, 100 * 1000); - orb->run (tv ACE_ENV_ARG_PARAMETER); + orb->run (tv); if (task0.done() && task1.done() && task2.done()) break; } @@ -118,18 +118,16 @@ main (int argc, char *argv[]) while (orb->work_pending()) { ACE_Time_Value tv(0, 100 * 1000); - orb->run(tv ACE_ENV_ARG_PARAMETER); + orb->run(tv); } orb->destroy (); } - ACE_CATCHANY + catch (const CORBA::Exception& ex) { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Exception caught:"); + ex._tao_print_exception ("Exception caught:"); return 1; } - ACE_ENDTRY; ACE_DEBUG ((LM_DEBUG, "(%P) Ending client\n")); diff --git a/TAO/tests/Big_Request_Muxing/server.cpp b/TAO/tests/Big_Request_Muxing/server.cpp index 3d9d03a6a3b..e52c688cbde 100644 --- a/TAO/tests/Big_Request_Muxing/server.cpp +++ b/TAO/tests/Big_Request_Muxing/server.cpp @@ -47,13 +47,13 @@ main (int argc, char *argv[]) { ACE_DEBUG ((LM_DEBUG, "Starting server\n")); - ACE_TRY_NEW_ENV + try { CORBA::ORB_var orb = - CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER); + CORBA::ORB_init (argc, argv, ""); CORBA::Object_var poa_object = - orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER); + orb->resolve_initial_references("RootPOA"); if (CORBA::is_nil (poa_object.in ())) ACE_ERROR_RETURN ((LM_ERROR, @@ -61,7 +61,7 @@ main (int argc, char *argv[]) 1); PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER); + PortableServer::POA::_narrow (poa_object.in ()); PortableServer::POAManager_var poa_manager = root_poa->the_POAManager (); @@ -79,7 +79,7 @@ main (int argc, char *argv[]) payload_receiver_impl->_this (); CORBA::String_var ior = - orb->object_to_string (payload_receiver.in () ACE_ENV_ARG_PARAMETER); + orb->object_to_string (payload_receiver.in ()); // If the ior_output_file exists, output the ior to it FILE *output_file= ACE_OS::fopen (ior_output_file, "w"); @@ -106,7 +106,7 @@ main (int argc, char *argv[]) int prev_count = count; int sn_prev_count = sn_count; ACE_Time_Value tv(0, 100 * 1000); - orb->run (tv ACE_ENV_ARG_PARAMETER); + orb->run (tv); count = payload_receiver_impl->count(); sn_count = payload_receiver_impl->count(true); if ((count < expected && count == prev_count) || @@ -148,17 +148,16 @@ main (int argc, char *argv[]) count, expected, payload_receiver_impl->count(true), runtime.sec(), runtime.usec())); - root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER); + root_poa->destroy (1, 1); orb->destroy (); return result; } - ACE_CATCHANY + catch (const CORBA::Exception& ex) { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught:"); + ex._tao_print_exception ("Exception caught:"); } - ACE_ENDTRY; ACE_DEBUG ((LM_DEBUG, "Ending server\n")); |