summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/tests/Notify/Discarding/Sequence_Consumer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/tests/Notify/Discarding/Sequence_Consumer.cpp')
-rw-r--r--TAO/orbsvcs/tests/Notify/Discarding/Sequence_Consumer.cpp34
1 files changed, 15 insertions, 19 deletions
diff --git a/TAO/orbsvcs/tests/Notify/Discarding/Sequence_Consumer.cpp b/TAO/orbsvcs/tests/Notify/Discarding/Sequence_Consumer.cpp
index 2da610b8bb1..2985122fb7a 100644
--- a/TAO/orbsvcs/tests/Notify/Discarding/Sequence_Consumer.cpp
+++ b/TAO/orbsvcs/tests/Notify/Discarding/Sequence_Consumer.cpp
@@ -97,14 +97,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 ());
@@ -113,17 +111,16 @@ 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,
Notify_Sequence_Push_Consumer ("consumer1", discard_policy, *client, sent),
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);
}
// ******************************************************************
@@ -133,48 +130,47 @@ 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);
ACE_UNUSED_ARG(status);
ACE_ASSERT(status == 0);
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 ());
ACE_ASSERT(! CORBA::is_nil (sig.in ()));
CosNotifyChannelAdmin::ConsumerAdmin_var admin =
- create_consumeradmin (ec.in () ACE_ENV_ARG_PARAMETER);
+ create_consumeradmin (ec.in ());
ACE_ASSERT(!CORBA::is_nil (admin.in ()));
- create_consumers (admin.in (), &client ACE_ENV_ARG_PARAMETER);
+ create_consumers (admin.in (), &client);
// Tell the supplier to go
sig->go ();
ACE_DEBUG((LM_DEBUG, "Consumer waiting for events...\n"));
- client.ORB_run( ACE_ENV_SINGLE_ARG_PARAMETER );
+ client.ORB_run( );
ACE_DEBUG((LM_DEBUG, "Consumer done.\n"));
consumer_1->disconnect();
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;
}