summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/Event/ECG_Reconnect_ConsumerEC_Control.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/Event/ECG_Reconnect_ConsumerEC_Control.cpp')
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/ECG_Reconnect_ConsumerEC_Control.cpp126
1 files changed, 43 insertions, 83 deletions
diff --git a/TAO/orbsvcs/orbsvcs/Event/ECG_Reconnect_ConsumerEC_Control.cpp b/TAO/orbsvcs/orbsvcs/Event/ECG_Reconnect_ConsumerEC_Control.cpp
index 2e14b4da681..9358fbc65af 100644
--- a/TAO/orbsvcs/orbsvcs/Event/ECG_Reconnect_ConsumerEC_Control.cpp
+++ b/TAO/orbsvcs/orbsvcs/Event/ECG_Reconnect_ConsumerEC_Control.cpp
@@ -34,90 +34,74 @@ 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);
- ACE_TRY_CHECK;
+ gateway_->consumer_ec_non_existent (disconnected);
if (!non_existent)
{
- this->reconnect(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ this->reconnect();
}
}
- ACE_CATCHANY
+ catch (const CORBA::Exception&)
{
// 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_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ gateway_->reconnect_consumer_ec();
}
- ACE_CATCHANY
+ catch (const CORBA::Exception&)
{
// 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);
- ACE_TRY_CHECK;
+ gateway_->consumer_ec_non_existent (disconnected);
if (non_existent && !disconnected)
{
- this->event_channel_not_exist (gateway_ ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ this->event_channel_not_exist (gateway_);
}
}
else
{
- this->try_reconnect(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ this->try_reconnect();
}
}
- ACE_CATCH (CORBA::OBJECT_NOT_EXIST, ex)
+ catch (const CORBA::OBJECT_NOT_EXIST&)
{
- this->event_channel_not_exist (gateway_ ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ this->event_channel_not_exist (gateway_);
}
- 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->event_channel_not_exist (gateway_ ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ this->event_channel_not_exist (gateway_);
}
- ACE_CATCHANY
+ catch (const CORBA::Exception&)
{
// Ignore all exceptions
}
- ACE_ENDTRY;
}
void
@@ -132,59 +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);
- 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 consumers...
- this->query_eventchannel (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ this->query_eventchannel ();
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_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);
- 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;
@@ -195,9 +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);
- ACE_TRY_CHECK;
+ any);
// Only schedule the timer, when the rate is not zero
if (this->rate_ != ACE_Time_Value::zero)
@@ -213,11 +182,10 @@ TAO_ECG_Reconnect_ConsumerEC_Control::activate (void)
return -1;
}
}
- ACE_CATCHANY
+ catch (const CORBA::Exception&)
{
return -1;
}
- ACE_ENDTRY;
#endif /* TAO_HAS_CORBA_MESSAGING */
return 0;
@@ -238,38 +206,33 @@ 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) - "
// "channel %x does not exists\n"));
is_consumer_ec_connected_ = 0;
- gateway->suspend_supplier_ec (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ gateway->suspend_supplier_ec ();
- gateway->cleanup_consumer_proxies (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ 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
@@ -286,17 +249,14 @@ TAO_ECG_Reconnect_ConsumerEC_Control::system_exception (
// "channel %x does not exists system except\n"));
is_consumer_ec_connected_ = 0;
- gateway->suspend_supplier_ec (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ gateway->suspend_supplier_ec ();
- gateway->cleanup_consumer_proxies (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ gateway->cleanup_consumer_proxies ();
}
- ACE_CATCHANY
+ catch (const CORBA::Exception&)
{
// Ignore all exceptions..
}
- ACE_ENDTRY;
}
// ****************************************************************