diff options
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/Event/EC_Reactive_SupplierControl.cpp')
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Event/EC_Reactive_SupplierControl.cpp | 94 |
1 files changed, 31 insertions, 63 deletions
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_SupplierControl.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_SupplierControl.cpp index e6e08c409d5..40e96be4414 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_SupplierControl.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_SupplierControl.cpp @@ -42,13 +42,10 @@ TAO_EC_Reactive_SupplierControl::~TAO_EC_Reactive_SupplierControl (void) } void -TAO_EC_Reactive_SupplierControl::query_suppliers ( - ACE_ENV_SINGLE_ARG_DECL) +TAO_EC_Reactive_SupplierControl::query_suppliers () { TAO_EC_Ping_Supplier worker (this); - this->event_channel_->for_each_supplier (&worker - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; + this->event_channel_->for_each_supplier (&worker); } void @@ -56,59 +53,46 @@ TAO_EC_Reactive_SupplierControl::handle_timeout ( const ACE_Time_Value &, const void *) { - ACE_TRY_NEW_ENV + try { // Query the state of the Current object *before* we initiate // the iteration... CORBA::PolicyTypeSeq types; CORBA::PolicyList_var policies = - this->policy_current_->get_policy_overrides (types - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + this->policy_current_->get_policy_overrides (types); // Change the timeout this->policy_current_->set_policy_overrides (this->policy_list_, - CORBA::ADD_OVERRIDE - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + CORBA::ADD_OVERRIDE); // Query the state of the suppliers... - this->query_suppliers (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + this->query_suppliers (); this->policy_current_->set_policy_overrides (policies.in (), - CORBA::SET_OVERRIDE - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + CORBA::SET_OVERRIDE); for (CORBA::ULong i = 0; i != policies->length (); ++i) { - policies[i]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + policies[i]->destroy (); } } - ACE_CATCHANY + catch (const CORBA::Exception&) { // Ignore all exceptions } - ACE_ENDTRY; } int TAO_EC_Reactive_SupplierControl::activate (void) { #if defined (TAO_HAS_CORBA_MESSAGING) && TAO_HAS_CORBA_MESSAGING != 0 - ACE_TRY_NEW_ENV + try { // Get the PolicyCurrent object CORBA::Object_var tmp = - this->orb_->resolve_initial_references ("PolicyCurrent" - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + this->orb_->resolve_initial_references ("PolicyCurrent"); this->policy_current_ = - CORBA::PolicyCurrent::_narrow (tmp.in () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + CORBA::PolicyCurrent::_narrow (tmp.in ()); // Timeout for polling state (default = 10 msec) TimeBase::TimeT timeout = timeout_.usec() * 10; @@ -119,9 +103,7 @@ TAO_EC_Reactive_SupplierControl::activate (void) this->policy_list_[0] = this->orb_->create_policy ( Messaging::RELATIVE_RT_TIMEOUT_POLICY_TYPE, - any - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + any); // Only schedule the timer, when the rate is not zero if (this->rate_ != ACE_Time_Value::zero) @@ -137,11 +119,10 @@ TAO_EC_Reactive_SupplierControl::activate (void) return -1; } } - ACE_CATCHANY + catch (const CORBA::Exception&) { return -1; } - ACE_ENDTRY; #endif /* TAO_HAS_CORBA_MESSAGING */ return 0; @@ -161,31 +142,27 @@ TAO_EC_Reactive_SupplierControl::shutdown (void) void TAO_EC_Reactive_SupplierControl::supplier_not_exist ( - TAO_EC_ProxyPushConsumer *proxy - ACE_ENV_ARG_DECL) + TAO_EC_ProxyPushConsumer *proxy) { - ACE_TRY + try { //ACE_DEBUG ((LM_DEBUG, // "EC_Reactive_SupplierControl(%P|%t) - " // "Consumer %x does not exists\n", long(proxy))); - proxy->disconnect_push_consumer (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + proxy->disconnect_push_consumer (); } - ACE_CATCHANY + catch (const CORBA::Exception&) { // Ignore all exceptions.. } - ACE_ENDTRY; } void TAO_EC_Reactive_SupplierControl::system_exception ( TAO_EC_ProxyPushConsumer *proxy, - CORBA::SystemException & /* exception */ - ACE_ENV_ARG_DECL) + CORBA::SystemException & /* exception */) { - ACE_TRY + try { // The current implementation is very strict, and kicks out a // client on the first system exception. We may @@ -197,14 +174,12 @@ TAO_EC_Reactive_SupplierControl::system_exception ( // return; // Anything else is serious, including timeouts... - proxy->disconnect_push_consumer (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + proxy->disconnect_push_consumer (); } - ACE_CATCHANY + catch (const CORBA::Exception&) { // Ignore all exceptions.. } - ACE_ENDTRY; } // **************************************************************** @@ -227,40 +202,33 @@ TAO_EC_SupplierControl_Adapter::handle_timeout ( // **************************************************************** void -TAO_EC_Ping_Supplier::work (TAO_EC_ProxyPushConsumer *consumer - ACE_ENV_ARG_DECL) +TAO_EC_Ping_Supplier::work (TAO_EC_ProxyPushConsumer *consumer) { - ACE_TRY + try { CORBA::Boolean disconnected; CORBA::Boolean non_existent = - consumer->supplier_non_existent (disconnected - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + consumer->supplier_non_existent (disconnected); if (non_existent && !disconnected) { - this->control_->supplier_not_exist (consumer ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + this->control_->supplier_not_exist (consumer); } } - ACE_CATCH (CORBA::OBJECT_NOT_EXIST, ex) + catch (const CORBA::OBJECT_NOT_EXIST&) { - this->control_->supplier_not_exist (consumer ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + this->control_->supplier_not_exist (consumer); } - ACE_CATCH (CORBA::TRANSIENT, transient) + catch (const CORBA::TRANSIENT&) { // This is TAO's minor code for a failed connection, we may // want to be more lenient in the future.. // if (transient.minor () == 0x54410085) - this->control_->supplier_not_exist (consumer ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + this->control_->supplier_not_exist (consumer); } - ACE_CATCHANY + catch (const CORBA::Exception&) { // Ignore all exceptions } - ACE_ENDTRY; } TAO_END_VERSIONED_NAMESPACE_DECL |