summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/examples/Log/Notify/Notify_Consumer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/examples/Log/Notify/Notify_Consumer.cpp')
-rw-r--r--TAO/orbsvcs/examples/Log/Notify/Notify_Consumer.cpp38
1 files changed, 15 insertions, 23 deletions
diff --git a/TAO/orbsvcs/examples/Log/Notify/Notify_Consumer.cpp b/TAO/orbsvcs/examples/Log/Notify/Notify_Consumer.cpp
index 7d99a17e566..6f5ca7c53f0 100644
--- a/TAO/orbsvcs/examples/Log/Notify/Notify_Consumer.cpp
+++ b/TAO/orbsvcs/examples/Log/Notify/Notify_Consumer.cpp
@@ -35,36 +35,34 @@ Consumer::Consumer (void)
int
Consumer::run (int argc, char* argv[])
{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
+ try
{
// ORB initialization boiler plate...
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (argc, argv, "");
// Do *NOT* make a copy because we don't want the ORB to outlive
// the Consumer object.
this->orb_ = orb.in ();
CORBA::Object_var object =
- orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
+ orb->resolve_initial_references ("RootPOA");
PortableServer::POA_var poa =
- PortableServer::POA::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
+ PortableServer::POA::_narrow (object.in ());
PortableServer::POAManager_var poa_manager =
poa->the_POAManager ();
poa_manager->activate ();
// Obtain the event channel
CORBA::Object_var naming_obj =
- this->orb_->resolve_initial_references (NAMING_SERVICE_NAME
- ACE_ENV_ARG_PARAMETER);
+ this->orb_->resolve_initial_references (NAMING_SERVICE_NAME);
// Need to check return value for errors.
if (CORBA::is_nil (naming_obj.in ()))
ACE_THROW_RETURN (CORBA::UNKNOWN (), 0);
this->naming_context_ =
- CosNaming::NamingContext::_narrow (naming_obj.in () ACE_ENV_ARG_PARAMETER);
+ CosNaming::NamingContext::_narrow (naming_obj.in ());
CosNaming::Name name (1);
@@ -72,12 +70,10 @@ Consumer::run (int argc, char* argv[])
name[0].id = CORBA::string_dup (NOTIFY_TLS_LOG_FACTORY_NAME);
CORBA::Object_var obj =
- this->naming_context_->resolve (name
- ACE_ENV_ARG_PARAMETER);
+ this->naming_context_->resolve (name);
this->notify_log_factory_ =
- DsNotifyLogAdmin::NotifyLogFactory::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ DsNotifyLogAdmin::NotifyLogFactory::_narrow (obj.in ());
CosNotifyComm::PushConsumer_var objref =
this->_this ();
@@ -85,19 +81,18 @@ Consumer::run (int argc, char* argv[])
ACE_ASSERT (!CORBA::is_nil (objref.in ()));
CosNotifyChannelAdmin::ProxySupplier_var proxysupplier =
- this->notify_log_factory_->obtain_notification_push_supplier (CosNotifyChannelAdmin::ANY_EVENT, proxy_supplier_id_ ACE_ENV_ARG_PARAMETER);
+ this->notify_log_factory_->obtain_notification_push_supplier (CosNotifyChannelAdmin::ANY_EVENT, proxy_supplier_id_);
ACE_ASSERT (!CORBA::is_nil (proxysupplier.in ()));
this->proxy_supplier_ =
CosNotifyChannelAdmin::ProxyPushSupplier::
- _narrow (proxysupplier.in () ACE_ENV_ARG_PARAMETER);
+ _narrow (proxysupplier.in ());
ACE_ASSERT (!CORBA::is_nil (proxy_supplier_.in ()));
- proxy_supplier_->connect_any_push_consumer (objref.in ()
- ACE_ENV_ARG_PARAMETER);
+ proxy_supplier_->connect_any_push_consumer (objref.in ());
orb_->run ();
@@ -108,18 +103,16 @@ Consumer::run (int argc, char* argv[])
// work_pending()/perform_work() to do more interesting stuff.
// Check the supplier for the proper way to do cleanup.
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Consumer::run");
+ ex._tao_print_exception ("Consumer::run");
return 1;
}
- ACE_ENDTRY;
return 0;
}
void
-Consumer::push (const CORBA::Any &event
- ACE_ENV_ARG_DECL_NOT_USED)
+Consumer::push (const CORBA::Any &event)
ACE_THROW_SPEC ((
CORBA::SystemException,
CosEventComm::Disconnected
@@ -148,8 +141,7 @@ Consumer::disconnect_push_consumer
void
Consumer::offer_change
(const CosNotification::EventTypeSeq & /*added*/,
- const CosNotification::EventTypeSeq & /*removed*/
- ACE_ENV_ARG_DECL_NOT_USED)
+ const CosNotification::EventTypeSeq & /*removed*/)
ACE_THROW_SPEC ((
CORBA::SystemException,
CosNotifyComm::InvalidEventType