diff options
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/Event/ECG_Reconnect_ConsumerEC_Control.cpp')
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Event/ECG_Reconnect_ConsumerEC_Control.cpp | 88 |
1 files changed, 34 insertions, 54 deletions
diff --git a/TAO/orbsvcs/orbsvcs/Event/ECG_Reconnect_ConsumerEC_Control.cpp b/TAO/orbsvcs/orbsvcs/Event/ECG_Reconnect_ConsumerEC_Control.cpp index 6a995f35dc5..15498ffc444 100644 --- a/TAO/orbsvcs/orbsvcs/Event/ECG_Reconnect_ConsumerEC_Control.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/ECG_Reconnect_ConsumerEC_Control.cpp @@ -34,59 +34,52 @@ TAO_ECG_Reconnect_ConsumerEC_Control::~TAO_ECG_Reconnect_ConsumerEC_Control (voi } void -TAO_ECG_Reconnect_ConsumerEC_Control::try_reconnect ( - ACE_ENV_SINGLE_ARG_DECL) +TAO_ECG_Reconnect_ConsumerEC_Control::try_reconnect () { - ACE_TRY + try { CORBA::Boolean disconnected; CORBA::Boolean non_existent = - gateway_->consumer_ec_non_existent (disconnected - ACE_ENV_ARG_PARAMETER); + gateway_->consumer_ec_non_existent (disconnected); if (!non_existent) { this->reconnect(); } } - ACE_CATCHANY + catch (const CORBA::Exception& ex) { // Ignore all exceptions } - ACE_ENDTRY; } void -TAO_ECG_Reconnect_ConsumerEC_Control::reconnect ( - ACE_ENV_SINGLE_ARG_DECL) +TAO_ECG_Reconnect_ConsumerEC_Control::reconnect () { - ACE_TRY + try { is_consumer_ec_connected_ = 1; gateway_->reconnect_consumer_ec(); } - ACE_CATCHANY + catch (const CORBA::Exception& ex) { // Ignore all exceptions } - ACE_ENDTRY; } void -TAO_ECG_Reconnect_ConsumerEC_Control::query_eventchannel ( - ACE_ENV_SINGLE_ARG_DECL) +TAO_ECG_Reconnect_ConsumerEC_Control::query_eventchannel () { - ACE_TRY + try { if (is_consumer_ec_connected_ == 1) { CORBA::Boolean disconnected; CORBA::Boolean non_existent = - gateway_->consumer_ec_non_existent (disconnected - ACE_ENV_ARG_PARAMETER); + gateway_->consumer_ec_non_existent (disconnected); if (non_existent && !disconnected) { - this->event_channel_not_exist (gateway_ ACE_ENV_ARG_PARAMETER); + this->event_channel_not_exist (gateway_); } } else @@ -94,22 +87,21 @@ TAO_ECG_Reconnect_ConsumerEC_Control::query_eventchannel ( this->try_reconnect(); } } - ACE_CATCH (CORBA::OBJECT_NOT_EXIST, ex) + catch (const CORBA::OBJECT_NOT_EXIST& ex) { - this->event_channel_not_exist (gateway_ ACE_ENV_ARG_PARAMETER); + this->event_channel_not_exist (gateway_); } - ACE_CATCH (CORBA::TRANSIENT, transient) + catch (const CORBA::TRANSIENT& 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->event_channel_not_exist (gateway_ ACE_ENV_ARG_PARAMETER); + this->event_channel_not_exist (gateway_); } - ACE_CATCHANY + catch (const CORBA::Exception& ex) { // Ignore all exceptions } - ACE_ENDTRY; } void @@ -124,52 +116,46 @@ TAO_ECG_Reconnect_ConsumerEC_Control::handle_timeout ( // remote calls will be carried out with with // RELATIVE_RT_TIMEOUT_POLICY set here in effect. // @@ TODO: should use Guard to set and reset policies. - 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); + 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); + CORBA::ADD_OVERRIDE); // Query the state of the consumers... this->query_eventchannel (); this->policy_current_->set_policy_overrides (policies.in (), - CORBA::SET_OVERRIDE - ACE_ENV_ARG_PARAMETER); + CORBA::SET_OVERRIDE); for (CORBA::ULong i = 0; i != policies->length (); ++i) { policies[i]->destroy (); } } - ACE_CATCHANY + catch (const CORBA::Exception& ex) { // Ignore all exceptions } - ACE_ENDTRY; } int TAO_ECG_Reconnect_ConsumerEC_Control::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); + this->orb_->resolve_initial_references ("PolicyCurrent"); this->policy_current_ = - CORBA::PolicyCurrent::_narrow (tmp.in () - ACE_ENV_ARG_PARAMETER); + CORBA::PolicyCurrent::_narrow (tmp.in ()); // Timeout for polling state (default = 10 msec) TimeBase::TimeT timeout = timeout_.usec() * 10; @@ -180,8 +166,7 @@ TAO_ECG_Reconnect_ConsumerEC_Control::activate (void) this->policy_list_[0] = this->orb_->create_policy ( Messaging::RELATIVE_RT_TIMEOUT_POLICY_TYPE, - any - ACE_ENV_ARG_PARAMETER); + any); // Only schedule the timer, when the rate is not zero if (this->rate_ != ACE_Time_Value::zero) @@ -197,11 +182,10 @@ TAO_ECG_Reconnect_ConsumerEC_Control::activate (void) return -1; } } - ACE_CATCHANY + catch (const CORBA::Exception& ex) { return -1; } - ACE_ENDTRY; #endif /* TAO_HAS_CORBA_MESSAGING */ return 0; @@ -222,10 +206,9 @@ TAO_ECG_Reconnect_ConsumerEC_Control::shutdown (void) void TAO_ECG_Reconnect_ConsumerEC_Control::event_channel_not_exist ( - TAO_EC_Gateway_IIOP* gateway - ACE_ENV_ARG_DECL) + TAO_EC_Gateway_IIOP* gateway) { - ACE_TRY + try { //ACE_DEBUG ((LM_DEBUG, // "ECG_Reconnect_ConsumerControl(%P|%t) - " @@ -236,22 +219,20 @@ TAO_ECG_Reconnect_ConsumerEC_Control::event_channel_not_exist ( gateway->cleanup_consumer_proxies (); } - ACE_CATCHANY + catch (const CORBA::Exception& ex) { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "TAO_EC_Reconnect_ConsumerControl::event_channel_not_exist"); + ex._tao_print_exception ( + "TAO_EC_Reconnect_ConsumerControl::event_channel_not_exist"); // Ignore all exceptions.. } - ACE_ENDTRY; } void TAO_ECG_Reconnect_ConsumerEC_Control::system_exception ( TAO_EC_Gateway_IIOP* gateway, - 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 @@ -272,11 +253,10 @@ TAO_ECG_Reconnect_ConsumerEC_Control::system_exception ( gateway->cleanup_consumer_proxies (); } - ACE_CATCHANY + catch (const CORBA::Exception& ex) { // Ignore all exceptions.. } - ACE_ENDTRY; } // **************************************************************** |