summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/Notify/Consumer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/Notify/Consumer.cpp')
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Consumer.cpp107
1 files changed, 40 insertions, 67 deletions
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Consumer.cpp b/TAO/orbsvcs/orbsvcs/Notify/Consumer.cpp
index 96a7d9ef8a7..b036e0d6b6e 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Consumer.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/Consumer.cpp
@@ -66,27 +66,24 @@ TAO_Notify_Consumer::qos_changed (const TAO_Notify_QoSProperties& qos_properties
}
void
-TAO_Notify_Consumer::resume (ACE_ENV_SINGLE_ARG_DECL)
+TAO_Notify_Consumer::resume (void)
{
this->is_suspended_ = 0;
- this->dispatch_pending (ACE_ENV_SINGLE_ARG_PARAMETER);
+ this->dispatch_pending ();
}
void
TAO_Notify_Consumer::enqueue_request (
- TAO_Notify_Method_Request_Event * request
- ACE_ENV_ARG_DECL)
+ TAO_Notify_Method_Request_Event * request)
{
TAO_Notify_Event::Ptr event (
- request->event ()->queueable_copy (ACE_ENV_SINGLE_ARG_PARAMETER));
- ACE_CHECK;
+ request->event ()->queueable_copy ());
TAO_Notify_Method_Request_Event_Queueable * queue_entry;
ACE_NEW_THROW_EX (queue_entry,
TAO_Notify_Method_Request_Event_Queueable (*request, event),
CORBA::NO_MEMORY ());
- ACE_CHECK;
if (DEBUG_LEVEL > 3) ACE_DEBUG ( (LM_DEBUG,
ACE_TEXT ("Consumer %d: enqueue_request (%d) @%@.\n"),
@@ -99,7 +96,7 @@ TAO_Notify_Consumer::enqueue_request (
}
bool
-TAO_Notify_Consumer::enqueue_if_necessary (TAO_Notify_Method_Request_Event * request ACE_ENV_ARG_DECL)
+TAO_Notify_Consumer::enqueue_if_necessary (TAO_Notify_Method_Request_Event * request)
{
ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, *this->proxy_lock (), false);
if (! this->pending_events().is_empty ())
@@ -111,14 +108,12 @@ TAO_Notify_Consumer::enqueue_if_necessary (TAO_Notify_Method_Request_Event * req
request->sequence ()
));
TAO_Notify_Event::Ptr event (
- request->event ()->queueable_copy (ACE_ENV_SINGLE_ARG_PARAMETER));
- ACE_CHECK_RETURN (false);
+ request->event ()->queueable_copy ());
TAO_Notify_Method_Request_Event_Queueable * queue_entry;
ACE_NEW_THROW_EX (queue_entry,
TAO_Notify_Method_Request_Event_Queueable (*request,
event),
CORBA::NO_MEMORY ());
- ACE_CHECK_RETURN (false);
this->pending_events().enqueue_tail (queue_entry);
this->schedule_timer (false);
return true;
@@ -132,14 +127,12 @@ TAO_Notify_Consumer::enqueue_if_necessary (TAO_Notify_Method_Request_Event * req
request->sequence ()
));
TAO_Notify_Event::Ptr event (
- request->event ()->queueable_copy (ACE_ENV_SINGLE_ARG_PARAMETER));
- ACE_CHECK_RETURN (false);
+ request->event ()->queueable_copy ());
TAO_Notify_Method_Request_Event_Queueable * queue_entry;
ACE_NEW_THROW_EX (queue_entry,
TAO_Notify_Method_Request_Event_Queueable (*request,
event),
CORBA::NO_MEMORY ());
- ACE_CHECK_RETURN (false);
this->pending_events().enqueue_tail (queue_entry);
this->schedule_timer (false);
return true;
@@ -148,14 +141,12 @@ TAO_Notify_Consumer::enqueue_if_necessary (TAO_Notify_Method_Request_Event * req
}
void
-TAO_Notify_Consumer::deliver (TAO_Notify_Method_Request_Event * request
- ACE_ENV_ARG_DECL)
+TAO_Notify_Consumer::deliver (TAO_Notify_Method_Request_Event * request)
{
// Increment reference counts (safely) to prevent this object and its proxy
// from being deleted while the push is in progress.
TAO_Notify_Proxy::Ptr proxy_guard (this->proxy ());
- bool queued = enqueue_if_necessary (request ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+ bool queued = enqueue_if_necessary (request);
if (!queued)
{
DispatchStatus status = this->dispatch_request (request);
@@ -174,8 +165,7 @@ TAO_Notify_Consumer::deliver (TAO_Notify_Method_Request_Event * request
ACE_TEXT ("to failed dispatch.\n"),
static_cast<int> (this->proxy ()->id ()),
request->sequence ()));
- this->enqueue_request (request ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+ this->enqueue_request (request);
this->schedule_timer (true);
break;
}
@@ -201,18 +191,15 @@ TAO_Notify_Consumer::deliver (TAO_Notify_Method_Request_Event * request
request->sequence ()
));
request->complete ();
- ACE_DECLARE_NEW_ENV;
- ACE_TRY
+ try
{
- this->proxy_supplier ()->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ this->proxy_supplier ()->destroy ();
}
- ACE_CATCHANY
+ catch (const CORBA::Exception&)
{
// todo is there something meaningful we can do here?
;
}
- ACE_ENDTRY;
break;
}
}
@@ -223,11 +210,9 @@ TAO_Notify_Consumer::DispatchStatus
TAO_Notify_Consumer::dispatch_request (TAO_Notify_Method_Request_Event * request)
{
DispatchStatus result = DISPATCH_SUCCESS;
- ACE_DECLARE_NEW_ENV;
- ACE_TRY
+ try
{
- request->event ()->push (this ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ request->event ()->push (this);
if (DEBUG_LEVEL > 8)
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("Consumer %d dispatched single event %d.\n"),
@@ -235,7 +220,7 @@ TAO_Notify_Consumer::dispatch_request (TAO_Notify_Method_Request_Event * request
request->sequence ()
));
}
- ACE_CATCH (CORBA::OBJECT_NOT_EXIST, ex)
+ catch (const CORBA::OBJECT_NOT_EXIST& ex)
{
if (DEBUG_LEVEL > 0)
{
@@ -248,7 +233,7 @@ TAO_Notify_Consumer::dispatch_request (TAO_Notify_Method_Request_Event * request
}
result = DISPATCH_FAIL;
}
- ACE_CATCH (CORBA::TRANSIENT, ex)
+ catch (const CORBA::TRANSIENT& ex)
{
if (DEBUG_LEVEL > 0)
ACE_DEBUG ((LM_ERROR,
@@ -288,7 +273,7 @@ TAO_Notify_Consumer::dispatch_request (TAO_Notify_Method_Request_Event * request
} break;
}
}
- ACE_CATCH (CORBA::TIMEOUT, ex)
+ catch (const CORBA::TIMEOUT& ex)
{
if (DEBUG_LEVEL > 0)
ACE_DEBUG ((LM_ERROR,
@@ -299,7 +284,7 @@ TAO_Notify_Consumer::dispatch_request (TAO_Notify_Method_Request_Event * request
));
result = DISPATCH_FAIL;
}
- ACE_CATCH (CORBA::COMM_FAILURE, ex)
+ catch (const CORBA::COMM_FAILURE& ex)
{
if (DEBUG_LEVEL > 0)
ACE_DEBUG ((LM_ERROR,
@@ -310,7 +295,7 @@ TAO_Notify_Consumer::dispatch_request (TAO_Notify_Method_Request_Event * request
));
result = DISPATCH_FAIL;
}
- ACE_CATCH (CORBA::SystemException, ex)
+ catch (const CORBA::SystemException& ex)
{
if (DEBUG_LEVEL > 0)
{
@@ -323,7 +308,7 @@ TAO_Notify_Consumer::dispatch_request (TAO_Notify_Method_Request_Event * request
}
result = DISPATCH_DISCARD;
}
- ACE_CATCHANY
+ catch (const CORBA::Exception&)
{
ACE_ERROR ( (LM_ERROR,
ACE_TEXT ("(%P|%t) TAO_Notify_Consumer %d::push "
@@ -333,7 +318,6 @@ TAO_Notify_Consumer::dispatch_request (TAO_Notify_Method_Request_Event * request
));
result = DISPATCH_DISCARD;
}
- ACE_ENDTRY;
// for persistent events that haven't timed out
// convert "FAIL" & "DISCARD" to "RETRY"
@@ -360,13 +344,11 @@ TAO_Notify_Consumer::DispatchStatus
TAO_Notify_Consumer::dispatch_batch (const CosNotification::EventBatch& batch)
{
DispatchStatus result = DISPATCH_SUCCESS;
- ACE_DECLARE_NEW_ENV;
- ACE_TRY
+ try
{
- this->push (batch ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ this->push (batch);
}
- ACE_CATCH (CORBA::OBJECT_NOT_EXIST, ex)
+ catch (const CORBA::OBJECT_NOT_EXIST& ex)
{
if (DEBUG_LEVEL > 0)
ACE_DEBUG ((LM_ERROR,
@@ -377,7 +359,7 @@ TAO_Notify_Consumer::dispatch_batch (const CosNotification::EventBatch& batch)
));
result = DISPATCH_FAIL;
}
- ACE_CATCH (CORBA::TRANSIENT, ex)
+ catch (const CORBA::TRANSIENT& ex)
{
if (DEBUG_LEVEL > 0)
ACE_DEBUG ((LM_ERROR,
@@ -417,7 +399,7 @@ TAO_Notify_Consumer::dispatch_batch (const CosNotification::EventBatch& batch)
} break;
}
}
- ACE_CATCH (CORBA::TIMEOUT, ex)
+ catch (const CORBA::TIMEOUT& ex)
{
if (DEBUG_LEVEL > 0)
ACE_DEBUG ((LM_ERROR,
@@ -428,7 +410,7 @@ TAO_Notify_Consumer::dispatch_batch (const CosNotification::EventBatch& batch)
));
result = DISPATCH_FAIL;
}
- ACE_CATCH (CORBA::COMM_FAILURE, ex)
+ catch (const CORBA::COMM_FAILURE& ex)
{
if (DEBUG_LEVEL > 0)
ACE_DEBUG ((LM_ERROR,
@@ -439,7 +421,7 @@ TAO_Notify_Consumer::dispatch_batch (const CosNotification::EventBatch& batch)
));
result = DISPATCH_FAIL;
}
- ACE_CATCH (CORBA::SystemException, ex)
+ catch (const CORBA::SystemException& ex)
{
if (DEBUG_LEVEL > 0)
{
@@ -452,7 +434,7 @@ TAO_Notify_Consumer::dispatch_batch (const CosNotification::EventBatch& batch)
}
result = DISPATCH_DISCARD;
}
- ACE_CATCHANY
+ catch (const CORBA::Exception&)
{
ACE_ERROR ((LM_ERROR,
ACE_TEXT ("(%P|%t) TAO_Notify_Consumer "
@@ -462,12 +444,11 @@ TAO_Notify_Consumer::dispatch_batch (const CosNotification::EventBatch& batch)
));
result = DISPATCH_DISCARD;
}
- ACE_ENDTRY;
return result;
}
void
-TAO_Notify_Consumer::dispatch_pending (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+TAO_Notify_Consumer::dispatch_pending (void)
{
if (DEBUG_LEVEL > 5)
ACE_DEBUG ((LM_DEBUG,
@@ -560,17 +541,14 @@ TAO_Notify_Consumer::dispatch_from_queue (Request_Queue & requests, ACE_Guard <T
ace_mon.acquire ();
}
ace_mon.release ();
- ACE_DECLARE_NEW_ENV;
- ACE_TRY
+ try
{
- this->proxy_supplier ()->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ this->proxy_supplier ()->destroy ();
}
- ACE_CATCHANY
+ catch (const CORBA::Exception&)
{
// todo is there something reasonable to do here?
}
- ACE_ENDTRY;
ace_mon.acquire ();
result = true;
break;
@@ -656,22 +634,19 @@ TAO_Notify_Consumer::handle_timeout (const ACE_Time_Value&, const void*)
{
TAO_Notify_Consumer::Ptr grd (this);
this->timer_id_ = -1; // This must come first, because dispatch_pending may try to resched
- ACE_DECLARE_NEW_ENV;
- ACE_TRY
+ try
{
- this->dispatch_pending (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ this->dispatch_pending ();
}
- ACE_CATCHALL
+ catch (...)
{
}
- ACE_ENDTRY;
return 0;
}
void
-TAO_Notify_Consumer::shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+TAO_Notify_Consumer::shutdown (void)
{
if (this->timer_.isSet ())
{
@@ -681,18 +656,16 @@ TAO_Notify_Consumer::shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
}
void
-TAO_Notify_Consumer::dispatch_updates_i (const CosNotification::EventTypeSeq& added, const CosNotification::EventTypeSeq& removed
- ACE_ENV_ARG_DECL)
+TAO_Notify_Consumer::dispatch_updates_i (const CosNotification::EventTypeSeq& added, const CosNotification::EventTypeSeq& removed)
{
if (this->have_not_yet_verified_publish_)
{
this->have_not_yet_verified_publish_ = false; // no need to check again
- if (! this->publish_->_is_a ("IDL:omg.org/CosNotifyComm/NotifyPublish:1.0"
- ACE_ENV_ARG_PARAMETER))
+ if (! this->publish_->_is_a ("IDL:omg.org/CosNotifyComm/NotifyPublish:1.0"))
this->publish_ = CosNotifyComm::NotifyPublish::_nil();
}
if (! CORBA::is_nil (this->publish_.in ()))
- this->publish_->offer_change (added, removed ACE_ENV_ARG_PARAMETER);
+ this->publish_->offer_change (added, removed);
}
TAO_SYNCH_MUTEX*