diff options
Diffstat (limited to 'TAO/orbsvcs/tests/CosEvent/Basic')
-rw-r--r-- | TAO/orbsvcs/tests/CosEvent/Basic/Disconnect.cpp | 56 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/CosEvent/Basic/MT_Disconnect.cpp | 59 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/CosEvent/Basic/MT_Disconnect.h | 2 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/CosEvent/Basic/Pull_Push_Event.cpp | 56 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/CosEvent/Basic/Push_Event.cpp | 52 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/CosEvent/Basic/Random.cpp | 94 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/CosEvent/Basic/Random.h | 10 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/CosEvent/Basic/Shutdown.cpp | 40 |
8 files changed, 100 insertions, 269 deletions
diff --git a/TAO/orbsvcs/tests/CosEvent/Basic/Disconnect.cpp b/TAO/orbsvcs/tests/CosEvent/Basic/Disconnect.cpp index 5e8ce733528..25506efbbc1 100644 --- a/TAO/orbsvcs/tests/CosEvent/Basic/Disconnect.cpp +++ b/TAO/orbsvcs/tests/CosEvent/Basic/Disconnect.cpp @@ -26,35 +26,26 @@ main (int argc, char* argv[]) // ORB initialization boiler plate... CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; CORBA::Object_var object = orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; PortableServer::POA_var poa = PortableServer::POA::_narrow (object.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; PortableServer::POAManager_var poa_manager = - poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + poa->the_POAManager (); + poa_manager->activate (); // **************************************************************** run_test (poa.in (), 0 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; run_test (poa.in (), 1 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // **************************************************************** poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + orb->destroy (); } ACE_CATCHANY @@ -73,13 +64,10 @@ deactivate_servant (PortableServer::Servant servant ACE_ENV_ARG_DECL) { PortableServer::POA_var poa = - servant->_default_POA (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + servant->_default_POA (); PortableServer::ObjectId_var id = poa->servant_to_id (servant ACE_ENV_ARG_PARAMETER); - ACE_CHECK; poa->deactivate_object (id.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; } void @@ -91,24 +79,20 @@ run_test (PortableServer::POA_ptr poa, attributes.disconnect_callbacks = use_callbacks; TAO_CEC_EventChannel ec_impl (attributes); - ec_impl.activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + ec_impl.activate (); CosEventChannelAdmin::EventChannel_var event_channel = - ec_impl._this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + ec_impl._this (); // **************************************************************** // Obtain the consumer admin.. CosEventChannelAdmin::ConsumerAdmin_var consumer_admin = - event_channel->for_consumers (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + event_channel->for_consumers (); // and the supplier admin.. CosEventChannelAdmin::SupplierAdmin_var supplier_admin = - event_channel->for_suppliers (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + event_channel->for_suppliers (); // **************************************************************** @@ -123,50 +107,36 @@ run_test (PortableServer::POA_ptr poa, { supplier_0.connect (supplier_admin.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; consumer_0.connect (consumer_admin.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; if (i % 2 == 1) { supplier_1.connect (supplier_admin.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; consumer_1.connect (consumer_admin.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; } - supplier_0.disconnect (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - consumer_0.disconnect (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + supplier_0.disconnect (); + consumer_0.disconnect (); if (i % 2 == 1) { - consumer_1.disconnect (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - supplier_1.disconnect (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + consumer_1.disconnect (); + supplier_1.disconnect (); } } supplier_0.connect (supplier_admin.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; consumer_0.connect (consumer_admin.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - event_channel->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + event_channel->destroy (); deactivate_servant (&supplier_0 ACE_ENV_ARG_PARAMETER); - ACE_CHECK; deactivate_servant (&consumer_0 ACE_ENV_ARG_PARAMETER); - ACE_CHECK; deactivate_servant (&ec_impl ACE_ENV_ARG_PARAMETER); - ACE_CHECK; CORBA::ULong count_0 = 1; CORBA::ULong count_1 = 0; diff --git a/TAO/orbsvcs/tests/CosEvent/Basic/MT_Disconnect.cpp b/TAO/orbsvcs/tests/CosEvent/Basic/MT_Disconnect.cpp index 0c94a7bdb15..7e024dc3b18 100644 --- a/TAO/orbsvcs/tests/CosEvent/Basic/MT_Disconnect.cpp +++ b/TAO/orbsvcs/tests/CosEvent/Basic/MT_Disconnect.cpp @@ -26,35 +26,26 @@ main (int argc, char* argv[]) // ORB initialization boiler plate... CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; CORBA::Object_var object = orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; PortableServer::POA_var poa = PortableServer::POA::_narrow (object.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; PortableServer::POAManager_var poa_manager = - poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + poa->the_POAManager (); + poa_manager->activate (); // **************************************************************** run_test (poa.in (), 0 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; run_test (poa.in (), 1 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // **************************************************************** poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + orb->destroy (); } ACE_CATCHANY @@ -73,13 +64,10 @@ deactivate_servant (PortableServer::Servant servant ACE_ENV_ARG_DECL) { PortableServer::POA_var poa = - servant->_default_POA (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + servant->_default_POA (); PortableServer::ObjectId_var id = poa->servant_to_id (servant ACE_ENV_ARG_PARAMETER); - ACE_CHECK; poa->deactivate_object (id.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; } void @@ -91,12 +79,10 @@ run_test (PortableServer::POA_ptr poa, attributes.disconnect_callbacks = use_callbacks; TAO_CEC_EventChannel ec_impl (attributes); - ec_impl.activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + ec_impl.activate (); CosEventChannelAdmin::EventChannel_var event_channel = - ec_impl._this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + ec_impl._this (); MTD_Task task (event_channel.in (), use_callbacks); @@ -108,11 +94,9 @@ run_test (PortableServer::POA_ptr poa, // Wait for all the threads to complete and the return ACE_Thread_Manager::instance ()->wait (); - event_channel->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + event_channel->destroy (); deactivate_servant (&ec_impl ACE_ENV_ARG_PARAMETER); - ACE_CHECK; } MTD_Task::MTD_Task (CosEventChannelAdmin::EventChannel_ptr ec, @@ -130,8 +114,7 @@ MTD_Task::svc () { ACE_TRY_NEW_ENV { - this->run_iteration (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + this->run_iteration (); } ACE_CATCHANY { @@ -143,17 +126,15 @@ MTD_Task::svc () } void -MTD_Task::run_iteration (ACE_ENV_SINGLE_ARG_DECL) +MTD_Task::run_iteration (void) { // Obtain the consumer admin.. CosEventChannelAdmin::ConsumerAdmin_var consumer_admin = - this->event_channel->for_consumers (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + this->event_channel->for_consumers (); // and the supplier admin.. CosEventChannelAdmin::SupplierAdmin_var supplier_admin = - this->event_channel->for_suppliers (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + this->event_channel->for_suppliers (); // **************************************************************** @@ -168,37 +149,27 @@ MTD_Task::run_iteration (ACE_ENV_SINGLE_ARG_DECL) { supplier_0.connect (supplier_admin.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; consumer_0.connect (consumer_admin.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; if (i % 2 == 1) { supplier_1.connect (supplier_admin.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; consumer_1.connect (consumer_admin.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; } - supplier_0.disconnect (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - consumer_0.disconnect (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + supplier_0.disconnect (); + consumer_0.disconnect (); if (i % 2 == 1) { - consumer_1.disconnect (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - supplier_1.disconnect (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + consumer_1.disconnect (); + supplier_1.disconnect (); } } deactivate_servant (&supplier_0 ACE_ENV_ARG_PARAMETER); - ACE_CHECK; deactivate_servant (&consumer_0 ACE_ENV_ARG_PARAMETER); - ACE_CHECK; CORBA::ULong count_0 = 0; CORBA::ULong count_1 = 0; diff --git a/TAO/orbsvcs/tests/CosEvent/Basic/MT_Disconnect.h b/TAO/orbsvcs/tests/CosEvent/Basic/MT_Disconnect.h index 1248ee1b8ff..e0799f95255 100644 --- a/TAO/orbsvcs/tests/CosEvent/Basic/MT_Disconnect.h +++ b/TAO/orbsvcs/tests/CosEvent/Basic/MT_Disconnect.h @@ -34,7 +34,7 @@ public: // = Check the ACE_Task_Base documentation. int svc (void); - void run_iteration (ACE_ENV_SINGLE_ARG_DECL); + void run_iteration (void); // Run a single iteration of the test private: diff --git a/TAO/orbsvcs/tests/CosEvent/Basic/Pull_Push_Event.cpp b/TAO/orbsvcs/tests/CosEvent/Basic/Pull_Push_Event.cpp index abaa9184f9b..c3c42b529e7 100644 --- a/TAO/orbsvcs/tests/CosEvent/Basic/Pull_Push_Event.cpp +++ b/TAO/orbsvcs/tests/CosEvent/Basic/Pull_Push_Event.cpp @@ -21,19 +21,14 @@ main (int argc, char* argv[]) // ORB initialization boiler plate... CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; CORBA::Object_var object = orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; PortableServer::POA_var poa = PortableServer::POA::_narrow (object.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; PortableServer::POAManager_var poa_manager = - poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + poa->the_POAManager (); + poa_manager->activate (); // **************************************************************** @@ -41,24 +36,20 @@ main (int argc, char* argv[]) poa.in ()); TAO_CEC_EventChannel ec_impl (attributes); - ec_impl.activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + ec_impl.activate (); CosEventChannelAdmin::EventChannel_var event_channel = - ec_impl._this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + ec_impl._this (); // **************************************************************** // Obtain the consumer admin.. CosEventChannelAdmin::ConsumerAdmin_var consumer_admin = - event_channel->for_consumers (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + event_channel->for_consumers (); // Obtain the supplier admin.. CosEventChannelAdmin::SupplierAdmin_var supplier_admin = - event_channel->for_suppliers (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + event_channel->for_suppliers (); // **************************************************************** @@ -68,7 +59,6 @@ main (int argc, char* argv[]) supplier_00.connect (supplier_admin.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // **************************************************************** @@ -76,7 +66,6 @@ main (int argc, char* argv[]) supplier_01.connect (supplier_admin.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // **************************************************************** @@ -84,7 +73,6 @@ main (int argc, char* argv[]) supplier_10.connect (supplier_admin.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // **************************************************************** @@ -92,7 +80,6 @@ main (int argc, char* argv[]) supplier_11.connect (supplier_admin.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // **************************************************************** @@ -101,21 +88,18 @@ main (int argc, char* argv[]) CEC_Counting_Consumer consumer_00 ("Consumer/00"); consumer_00.connect (consumer_admin.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // **************************************************************** CEC_Pull_Counting_Consumer consumer_01 ("Consumer/01"); consumer_01.connect (consumer_admin.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // **************************************************************** CEC_Pull_Counting_Consumer consumer_10 ("Consumer/10"); consumer_10.connect (consumer_admin.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // **************************************************************** @@ -174,36 +158,26 @@ main (int argc, char* argv[]) // **************************************************************** - consumer_10.disconnect (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + consumer_10.disconnect (); - consumer_01.disconnect (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + consumer_01.disconnect (); - consumer_00.disconnect (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + consumer_00.disconnect (); - supplier_11.disconnect (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - supplier_10.disconnect (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - supplier_01.disconnect (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - supplier_00.disconnect (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + supplier_11.disconnect (); + supplier_10.disconnect (); + supplier_01.disconnect (); + supplier_00.disconnect (); // **************************************************************** - event_channel->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + event_channel->destroy (); // **************************************************************** poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + orb->destroy (); // **************************************************************** diff --git a/TAO/orbsvcs/tests/CosEvent/Basic/Push_Event.cpp b/TAO/orbsvcs/tests/CosEvent/Basic/Push_Event.cpp index 3ff9f720233..9535308ef8f 100644 --- a/TAO/orbsvcs/tests/CosEvent/Basic/Push_Event.cpp +++ b/TAO/orbsvcs/tests/CosEvent/Basic/Push_Event.cpp @@ -21,19 +21,14 @@ main (int argc, char* argv[]) // ORB initialization boiler plate... CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; CORBA::Object_var object = orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; PortableServer::POA_var poa = PortableServer::POA::_narrow (object.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; PortableServer::POAManager_var poa_manager = - poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + poa->the_POAManager (); + poa_manager->activate (); // **************************************************************** @@ -41,24 +36,20 @@ main (int argc, char* argv[]) poa.in ()); TAO_CEC_EventChannel ec_impl (attributes); - ec_impl.activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + ec_impl.activate (); CosEventChannelAdmin::EventChannel_var event_channel = - ec_impl._this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + ec_impl._this (); // **************************************************************** // Obtain the consumer admin.. CosEventChannelAdmin::ConsumerAdmin_var consumer_admin = - event_channel->for_consumers (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + event_channel->for_consumers (); // Obtain the supplier admin.. CosEventChannelAdmin::SupplierAdmin_var supplier_admin = - event_channel->for_suppliers (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + event_channel->for_suppliers (); // **************************************************************** @@ -68,7 +59,6 @@ main (int argc, char* argv[]) supplier_00.connect (supplier_admin.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // **************************************************************** @@ -76,7 +66,6 @@ main (int argc, char* argv[]) supplier_01.connect (supplier_admin.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // **************************************************************** @@ -84,7 +73,6 @@ main (int argc, char* argv[]) supplier_10.connect (supplier_admin.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // **************************************************************** @@ -92,7 +80,6 @@ main (int argc, char* argv[]) supplier_11.connect (supplier_admin.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // **************************************************************** @@ -101,14 +88,12 @@ main (int argc, char* argv[]) CEC_Counting_Consumer consumer_00 ("Consumer/00"); consumer_00.connect (consumer_admin.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // **************************************************************** CEC_Counting_Consumer consumer_01 ("Consumer/01"); consumer_01.connect (consumer_admin.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // **************************************************************** @@ -147,33 +132,24 @@ main (int argc, char* argv[]) // **************************************************************** - consumer_01.disconnect (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + consumer_01.disconnect (); - consumer_00.disconnect (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + consumer_00.disconnect (); - supplier_11.disconnect (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - supplier_10.disconnect (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - supplier_01.disconnect (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - supplier_00.disconnect (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + supplier_11.disconnect (); + supplier_10.disconnect (); + supplier_01.disconnect (); + supplier_00.disconnect (); // **************************************************************** - event_channel->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + event_channel->destroy (); // **************************************************************** poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + orb->destroy (); // **************************************************************** diff --git a/TAO/orbsvcs/tests/CosEvent/Basic/Random.cpp b/TAO/orbsvcs/tests/CosEvent/Basic/Random.cpp index 0c5aea70a2f..b0f24061faa 100644 --- a/TAO/orbsvcs/tests/CosEvent/Basic/Random.cpp +++ b/TAO/orbsvcs/tests/CosEvent/Basic/Random.cpp @@ -25,13 +25,10 @@ deactivate_servant (PortableServer::Servant servant ACE_ENV_ARG_DECL) { PortableServer::POA_var poa = - servant->_default_POA (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + servant->_default_POA (); PortableServer::ObjectId_var oid = poa->servant_to_id (servant ACE_ENV_ARG_PARAMETER); - ACE_CHECK; poa->deactivate_object (oid.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; } @@ -51,7 +48,6 @@ RND_Driver::run (int argc, char *argv[]) { CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // **************************************************************** @@ -108,15 +104,11 @@ RND_Driver::run (int argc, char *argv[]) CORBA::Object_var object = orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; PortableServer::POA_var poa = PortableServer::POA::_narrow (object.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; PortableServer::POAManager_var poa_manager = - poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + poa->the_POAManager (); + poa_manager->activate (); // **************************************************************** @@ -126,30 +118,25 @@ RND_Driver::run (int argc, char *argv[]) attributes.supplier_reconnect = 1; TAO_CEC_EventChannel ec_impl (attributes); - ec_impl.activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + ec_impl.activate (); CosEventChannelAdmin::EventChannel_var event_channel = - ec_impl._this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + ec_impl._this (); // **************************************************************** // Obtain the consumer admin.. this->consumer_admin_ = - event_channel->for_consumers (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + event_channel->for_consumers (); // Obtain the supplier admin.. this->supplier_admin_ = - event_channel->for_suppliers (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + event_channel->for_suppliers (); // **************************************************************** this->supplier_.connect (this->supplier_admin_.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // **************************************************************** @@ -163,8 +150,7 @@ RND_Driver::run (int argc, char *argv[]) 1); CORBA::Object_var obj = - this->consumers_[i]->_this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + this->consumers_[i]->_this (); } // **************************************************************** @@ -180,8 +166,7 @@ RND_Driver::run (int argc, char *argv[]) this->suppliers_[j]->activate (); CORBA::Object_var obj = - this->suppliers_[j]->_this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + this->suppliers_[j]->_this (); } // **************************************************************** @@ -190,8 +175,7 @@ RND_Driver::run (int argc, char *argv[]) { ACE_Time_Value tv (0, 50000); orb->run (tv); - this->supplier_.push_new_event (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + this->supplier_.push_new_event (); } ACE_Thread_Manager::instance ()->wait (); @@ -203,9 +187,7 @@ RND_Driver::run (int argc, char *argv[]) { deactivate_servant (this->suppliers_[k] ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - this->suppliers_[k]->_remove_ref (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + this->suppliers_[k]->_remove_ref (); } delete[] this->suppliers_; this->suppliers_ = 0; @@ -215,8 +197,7 @@ RND_Driver::run (int argc, char *argv[]) // We destroy now to verify that the callbacks work and do not // produce any problems. - event_channel->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + event_channel->destroy (); // **************************************************************** @@ -225,9 +206,7 @@ RND_Driver::run (int argc, char *argv[]) { deactivate_servant (this->consumers_[k] ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - this->consumers_[k]->_remove_ref (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + this->consumers_[k]->_remove_ref (); } delete[] this->consumers_; this->consumers_ = 0; @@ -237,17 +216,14 @@ RND_Driver::run (int argc, char *argv[]) deactivate_servant (&ec_impl ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // **************************************************************** poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // **************************************************************** - orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + orb->destroy (); } ACE_CATCHANY { @@ -282,7 +258,6 @@ RND_Driver::timer (const CORBA::Any &e recursion++; new_event <<= recursion; this->supplier_.push (new_event ACE_ENV_ARG_PARAMETER); - ACE_CHECK; } } break; @@ -303,7 +278,6 @@ RND_Driver::timer (const CORBA::Any &e this->suppliers_[n]->connect (this->supplier_admin_.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; } break; @@ -315,7 +289,6 @@ RND_Driver::timer (const CORBA::Any &e this->consumers_[n]->connect (this->consumer_admin_.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; } break; @@ -325,8 +298,7 @@ RND_Driver::timer (const CORBA::Any &e // ACE_DEBUG ((LM_DEBUG, "Disconnecting supplier %d\n", n)); - this->suppliers_[n]->disconnect (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + this->suppliers_[n]->disconnect (); } break; @@ -336,8 +308,7 @@ RND_Driver::timer (const CORBA::Any &e // ACE_DEBUG ((LM_DEBUG, "Disconnecting consumer %d\n", n)); - this->consumers_[n]->disconnect (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + this->consumers_[n]->disconnect (); } break; } @@ -362,29 +333,25 @@ RND_Consumer::connect (CosEventChannelAdmin::ConsumerAdmin_ptr admin if (CORBA::is_nil (this->proxy_.in ())) { - this->proxy_ = admin->obtain_push_supplier (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + this->proxy_ = admin->obtain_push_supplier (); } proxy = CosEventChannelAdmin::ProxyPushSupplier::_duplicate(this->proxy_.in ()); } CosEventComm::PushConsumer_var me = - this->_this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + this->_this (); proxy->connect_push_consumer (me.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; } void -RND_Consumer::disconnect (ACE_ENV_SINGLE_ARG_DECL) +RND_Consumer::disconnect (void) { ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->lock_); if (CORBA::is_nil (this->proxy_.in ())) return; - this->proxy_->disconnect_push_supplier (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + this->proxy_->disconnect_push_supplier (); this->proxy_ = CosEventChannelAdmin::ProxyPushSupplier::_nil (); } @@ -398,7 +365,7 @@ RND_Consumer::push (const CORBA::Any &event } void -RND_Consumer::disconnect_push_consumer (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +RND_Consumer::disconnect_push_consumer (void) ACE_THROW_SPEC ((CORBA::SystemException)) { } @@ -415,8 +382,7 @@ RND_Supplier::connect (CosEventChannelAdmin::SupplierAdmin_ptr admin if (CORBA::is_nil (this->proxy_.in ())) { - this->proxy_ = admin->obtain_push_consumer (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + this->proxy_ = admin->obtain_push_consumer (); } proxy = @@ -427,29 +393,26 @@ RND_Supplier::connect (CosEventChannelAdmin::SupplierAdmin_ptr admin int r = ACE_OS::rand () % 2; if (r == 0) { - me = this->_this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + me = this->_this (); } proxy->connect_push_supplier (me.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; } void -RND_Supplier::disconnect (ACE_ENV_SINGLE_ARG_DECL) +RND_Supplier::disconnect (void) { ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->lock_); if (CORBA::is_nil (this->proxy_.in ())) return; - this->proxy_->disconnect_push_consumer (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + this->proxy_->disconnect_push_consumer (); this->proxy_ = CosEventChannelAdmin::ProxyPushConsumer::_nil (); } void -RND_Supplier::push_new_event (ACE_ENV_SINGLE_ARG_DECL) +RND_Supplier::push_new_event (void) { CORBA::Any event; CORBA::Long recursion = 0; @@ -477,7 +440,7 @@ RND_Supplier::push (CORBA::Any &event } void -RND_Supplier::disconnect_push_supplier (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +RND_Supplier::disconnect_push_supplier (void) ACE_THROW_SPEC ((CORBA::SystemException)) { } @@ -496,8 +459,7 @@ RND_Supplier::svc (void) ACE_Time_Value tv (0, 10000); ACE_OS::sleep (tv); - this->push_new_event (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + this->push_new_event (); } ACE_CATCHANY { diff --git a/TAO/orbsvcs/tests/CosEvent/Basic/Random.h b/TAO/orbsvcs/tests/CosEvent/Basic/Random.h index 0b26ea73695..38050b078d3 100644 --- a/TAO/orbsvcs/tests/CosEvent/Basic/Random.h +++ b/TAO/orbsvcs/tests/CosEvent/Basic/Random.h @@ -47,12 +47,12 @@ public: void push (const CORBA::Any &event ACE_ENV_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)); - void disconnect_push_consumer (ACE_ENV_SINGLE_ARG_DECL) + void disconnect_push_consumer (void) ACE_THROW_SPEC ((CORBA::SystemException)); void connect (CosEventChannelAdmin::ConsumerAdmin_ptr admin ACE_ENV_ARG_DECL); - void disconnect (ACE_ENV_SINGLE_ARG_DECL); + void disconnect (void); protected: RND_Driver *driver_; @@ -106,14 +106,14 @@ public: void connect (CosEventChannelAdmin::SupplierAdmin_ptr admin ACE_ENV_ARG_DECL); - void disconnect (ACE_ENV_SINGLE_ARG_DECL); + void disconnect (void); - void push_new_event (ACE_ENV_SINGLE_ARG_DECL); + void push_new_event (void); void push (CORBA::Any &event ACE_ENV_ARG_DECL); // Push a single event... - virtual void disconnect_push_supplier (ACE_ENV_SINGLE_ARG_DECL) + virtual void disconnect_push_supplier (void) ACE_THROW_SPEC ((CORBA::SystemException)); virtual int svc (void); diff --git a/TAO/orbsvcs/tests/CosEvent/Basic/Shutdown.cpp b/TAO/orbsvcs/tests/CosEvent/Basic/Shutdown.cpp index 85ec4180e9f..eebd951a1cb 100644 --- a/TAO/orbsvcs/tests/CosEvent/Basic/Shutdown.cpp +++ b/TAO/orbsvcs/tests/CosEvent/Basic/Shutdown.cpp @@ -24,35 +24,26 @@ main (int argc, char* argv[]) // ORB initialization boiler plate... CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; CORBA::Object_var object = orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; PortableServer::POA_var poa = PortableServer::POA::_narrow (object.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; PortableServer::POAManager_var poa_manager = - poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + poa->the_POAManager (); + poa_manager->activate (); // **************************************************************** run_test (poa.in (), 0 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; run_test (poa.in (), 1 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // **************************************************************** poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + orb->destroy (); } ACE_CATCHANY { @@ -68,13 +59,10 @@ deactivate_servant (PortableServer::Servant servant ACE_ENV_ARG_DECL) { PortableServer::POA_var poa = - servant->_default_POA (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + servant->_default_POA (); PortableServer::ObjectId_var id = poa->servant_to_id (servant ACE_ENV_ARG_PARAMETER); - ACE_CHECK; poa->deactivate_object (id.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; } static void @@ -87,24 +75,20 @@ run_test (PortableServer::POA_ptr poa, attributes.disconnect_callbacks = with_callbacks; TAO_CEC_EventChannel ec_impl (attributes); - ec_impl.activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + ec_impl.activate (); CosEventChannelAdmin::EventChannel_var event_channel = - ec_impl._this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + ec_impl._this (); // **************************************************************** // Obtain the consumer admin.. CosEventChannelAdmin::ConsumerAdmin_var consumer_admin = - event_channel->for_consumers (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + event_channel->for_consumers (); // Obtain the supplier admin.. CosEventChannelAdmin::SupplierAdmin_var supplier_admin = - event_channel->for_suppliers (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + event_channel->for_suppliers (); // **************************************************************** @@ -129,18 +113,15 @@ run_test (PortableServer::POA_ptr poa, for (i = 0; i != n; ++i) { consumer[i]->connect (consumer_admin.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; supplier[i]->connect (supplier_admin.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; } // **************************************************************** // Destroy the event channel, *before* disconnecting the // clients. - event_channel->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + event_channel->destroy (); // **************************************************************** @@ -166,16 +147,13 @@ run_test (PortableServer::POA_ptr poa, for (i = 0; i != n; ++i) { deactivate_servant (supplier[i] ACE_ENV_ARG_PARAMETER); - ACE_CHECK; delete supplier[i]; deactivate_servant (consumer[i] ACE_ENV_ARG_PARAMETER); - ACE_CHECK; delete consumer[i]; } delete[] supplier; delete[] consumer; deactivate_servant (&ec_impl ACE_ENV_ARG_PARAMETER); - ACE_CHECK; } |