summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/tests/Notify/Blocking/Structured_Consumer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/tests/Notify/Blocking/Structured_Consumer.cpp')
-rw-r--r--TAO/orbsvcs/tests/Notify/Blocking/Structured_Consumer.cpp32
1 files changed, 14 insertions, 18 deletions
diff --git a/TAO/orbsvcs/tests/Notify/Blocking/Structured_Consumer.cpp b/TAO/orbsvcs/tests/Notify/Blocking/Structured_Consumer.cpp
index f6ae74bdfe1..0b836c4bd63 100644
--- a/TAO/orbsvcs/tests/Notify/Blocking/Structured_Consumer.cpp
+++ b/TAO/orbsvcs/tests/Notify/Blocking/Structured_Consumer.cpp
@@ -71,14 +71,12 @@ Consumer_Client::parse_args (int argc, char *argv[])
static CosNotifyChannelAdmin::ConsumerAdmin_ptr
-create_consumeradmin (CosNotifyChannelAdmin::EventChannel_ptr ec
- ACE_ENV_ARG_DECL)
+create_consumeradmin (CosNotifyChannelAdmin::EventChannel_ptr ec)
{
CosNotifyChannelAdmin::AdminID adminid = 0;
CosNotifyChannelAdmin::ConsumerAdmin_var admin =
ec->new_for_consumers (CosNotifyChannelAdmin::OR_OP,
- adminid
- ACE_ENV_ARG_PARAMETER);
+ adminid);
return CosNotifyChannelAdmin::ConsumerAdmin::_duplicate (admin.in ());
@@ -87,8 +85,7 @@ create_consumeradmin (CosNotifyChannelAdmin::EventChannel_ptr ec
static void
create_consumers (CosNotifyChannelAdmin::ConsumerAdmin_ptr admin,
- Notify_Test_Client* client
- ACE_ENV_ARG_DECL)
+ Notify_Test_Client* client)
{
// startup the consumer
ACE_NEW_THROW_EX (consumer_1,
@@ -98,9 +95,9 @@ create_consumers (CosNotifyChannelAdmin::ConsumerAdmin_ptr admin,
expected,
*client),
CORBA::NO_MEMORY ());
- consumer_1->init (client->root_poa () ACE_ENV_ARG_PARAMETER);
+ consumer_1->init (client->root_poa ());
- consumer_1->_connect (admin ACE_ENV_ARG_PARAMETER);
+ consumer_1->_connect (admin);
}
// ******************************************************************
@@ -110,33 +107,33 @@ create_consumers (CosNotifyChannelAdmin::ConsumerAdmin_ptr admin,
int main (int argc, char* argv[])
{
int status = 0;
- ACE_TRY_NEW_ENV
+ try
{
Consumer_Client client;
- status = client.init (argc, argv ACE_ENV_ARG_PARAMETER);
+ status = client.init (argc, argv);
if (status != 0)
ACE_ERROR_RETURN ((LM_ERROR, "Error: Client init failed.\n"),1);
CosNotifyChannelAdmin::EventChannel_var ec =
- client.create_event_channel ("MyEventChannel", 1 ACE_ENV_ARG_PARAMETER);
+ client.create_event_channel ("MyEventChannel", 1);
CORBA::ORB_ptr orb = client.orb ();
CORBA::Object_var object =
- orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
+ orb->string_to_object (ior);
- sig_var sig = sig::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
+ sig_var sig = sig::_narrow (object.in ());
if (CORBA::is_nil (sig.in ()))
ACE_ERROR_RETURN ((LM_ERROR, "Error: Narrow failed.\n"),1);
CosNotifyChannelAdmin::ConsumerAdmin_var admin =
- create_consumeradmin (ec.in () ACE_ENV_ARG_PARAMETER);
+ create_consumeradmin (ec.in ());
if (CORBA::is_nil (admin.in ()))
ACE_ERROR_RETURN ((LM_ERROR, "Error: nil ConsumerAdmin.\n"),1);
- create_consumers (admin.in (), &client ACE_ENV_ARG_PARAMETER);
+ create_consumers (admin.in (), &client);
sig->go ();
@@ -149,12 +146,11 @@ int main (int argc, char* argv[])
sig->done ();
}
- ACE_CATCH (CORBA::Exception, e)
+ catch (const CORBA::Exception& e)
{
- ACE_PRINT_EXCEPTION (e, "Error: ");
+ e._tao_print_exception ("Error: ");
status = 1;
}
- ACE_ENDTRY;
return status;
}