summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/Event/ECG_Reactive_ConsumerEC_Control.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/Event/ECG_Reactive_ConsumerEC_Control.cpp')
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/ECG_Reactive_ConsumerEC_Control.cpp91
1 files changed, 31 insertions, 60 deletions
diff --git a/TAO/orbsvcs/orbsvcs/Event/ECG_Reactive_ConsumerEC_Control.cpp b/TAO/orbsvcs/orbsvcs/Event/ECG_Reactive_ConsumerEC_Control.cpp
index 0906d59820f..1a3c54d765e 100644
--- a/TAO/orbsvcs/orbsvcs/Event/ECG_Reactive_ConsumerEC_Control.cpp
+++ b/TAO/orbsvcs/orbsvcs/Event/ECG_Reactive_ConsumerEC_Control.cpp
@@ -34,40 +34,33 @@ TAO_ECG_Reactive_ConsumerEC_Control::~TAO_ECG_Reactive_ConsumerEC_Control (void)
}
void
-TAO_ECG_Reactive_ConsumerEC_Control::query_eventchannel (
- ACE_ENV_SINGLE_ARG_DECL)
+TAO_ECG_Reactive_ConsumerEC_Control::query_eventchannel ()
{
- 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 && !disconnected)
{
- this->event_channel_not_exist (gateway_ ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ this->event_channel_not_exist (gateway_);
}
}
- 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
@@ -83,59 +76,46 @@ TAO_ECG_Reactive_ConsumerEC_Control::handle_timeout (
// 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_Reactive_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;
@@ -146,9 +126,7 @@ TAO_ECG_Reactive_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)
@@ -164,11 +142,10 @@ TAO_ECG_Reactive_ConsumerEC_Control::activate (void)
return -1;
}
}
- ACE_CATCHANY
+ catch (const CORBA::Exception&)
{
return -1;
}
- ACE_ENDTRY;
#endif /* TAO_HAS_CORBA_MESSAGING */
return 0;
@@ -189,48 +166,42 @@ TAO_ECG_Reactive_ConsumerEC_Control::shutdown (void)
void
TAO_ECG_Reactive_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,
"EC_Reactive_ConsumerControl(%P|%t) - "
"channel %x does not exists\n"));
gateway->cleanup_consumer_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_Reactive_ConsumerControl::event_channel_not_exist");
+ ex._tao_print_exception (
+ "TAO_EC_Reactive_ConsumerControl::event_channel_not_exist");
// Ignore all exceptions..
}
- ACE_ENDTRY;
}
void
TAO_ECG_Reactive_ConsumerEC_Control::system_exception (
TAO_EC_Gateway_IIOP* gateway,
- CORBA::SystemException & /* exception */
- ACE_ENV_ARG_DECL)
+ CORBA::SystemException & /* exception */)
{
- ACE_TRY
+ try
{
gateway->cleanup_consumer_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;
}
// ****************************************************************