summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/tests/Notify/Sequence_Multi_ETCL_Filter/Sequence_Supplier.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/tests/Notify/Sequence_Multi_ETCL_Filter/Sequence_Supplier.cpp')
-rw-r--r--TAO/orbsvcs/tests/Notify/Sequence_Multi_ETCL_Filter/Sequence_Supplier.cpp43
1 files changed, 19 insertions, 24 deletions
diff --git a/TAO/orbsvcs/tests/Notify/Sequence_Multi_ETCL_Filter/Sequence_Supplier.cpp b/TAO/orbsvcs/tests/Notify/Sequence_Multi_ETCL_Filter/Sequence_Supplier.cpp
index 38a282be7f0..d752690b91a 100644
--- a/TAO/orbsvcs/tests/Notify/Sequence_Multi_ETCL_Filter/Sequence_Supplier.cpp
+++ b/TAO/orbsvcs/tests/Notify/Sequence_Multi_ETCL_Filter/Sequence_Supplier.cpp
@@ -112,14 +112,12 @@ Supplier_Client::parse_args (int argc, char *argv[])
static CosNotifyChannelAdmin::SupplierAdmin_ptr
-create_supplieradmin (CosNotifyChannelAdmin::EventChannel_ptr ec
- ACE_ENV_ARG_DECL)
+create_supplieradmin (CosNotifyChannelAdmin::EventChannel_ptr ec)
{
CosNotifyChannelAdmin::AdminID adminid = 0;
CosNotifyChannelAdmin::SupplierAdmin_var admin =
ec->new_for_suppliers (CosNotifyChannelAdmin::AND_OP,
- adminid
- ACE_ENV_ARG_PARAMETER);
+ adminid);
return CosNotifyChannelAdmin::SupplierAdmin::_duplicate (admin.in ());
@@ -127,7 +125,7 @@ create_supplieradmin (CosNotifyChannelAdmin::EventChannel_ptr ec
static void
-SendEvents (int id ACE_ENV_ARG_DECL)
+SendEvents (int id)
{
static const char* types[] = { "good", "bad", "ugly" };
CosNotification::EventBatch events;
@@ -169,30 +167,28 @@ SendEvents (int id ACE_ENV_ARG_DECL)
events[z] = event;
}
- ACE_TRY_NEW_ENV
+ try
{
- supplier_1->send_events (events ACE_ENV_ARG_PARAMETER);
+ supplier_1->send_events (events);
}
- ACE_CATCH (CORBA::Exception, e)
+ catch (const CORBA::Exception& e)
{
- ACE_PRINT_EXCEPTION (e, "Error: Supplier exception: ");
+ e._tao_print_exception ("Error: Supplier exception: ");
}
- ACE_ENDTRY;
}
static void
create_suppliers (CosNotifyChannelAdmin::SupplierAdmin_ptr admin,
- PortableServer::POA_ptr poa
- ACE_ENV_ARG_DECL)
+ PortableServer::POA_ptr poa)
{
// start up the supplier
ACE_NEW_THROW_EX (supplier_1,
TAO_Notify_Tests_SequencePushSupplier (),
CORBA::NO_MEMORY ());
- supplier_1->init (poa ACE_ENV_ARG_PARAMETER);
+ supplier_1->init (poa);
- supplier_1->connect (admin ACE_ENV_ARG_PARAMETER);
+ supplier_1->connect (admin);
}
@@ -204,15 +200,15 @@ int main (int argc, char* argv[])
{
ACE_Auto_Ptr< sig_i > sig_impl;
int status = 0;
- ACE_TRY_NEW_ENV
+ try
{
Supplier_Client client;
- status = client.init (argc, argv ACE_ENV_ARG_PARAMETER);
+ status = client.init (argc, argv);
if (status == 0)
{
CosNotifyChannelAdmin::EventChannel_var ec =
- client.create_event_channel ("MyEventChannel", 0 ACE_ENV_ARG_PARAMETER);
+ client.create_event_channel ("MyEventChannel", 0);
CORBA::ORB_ptr orb = client.orb ();
@@ -220,7 +216,7 @@ int main (int argc, char* argv[])
sig_var sig = sig_impl->_this ();
CORBA::String_var ior =
- orb->object_to_string (sig.in () ACE_ENV_ARG_PARAMETER);
+ orb->object_to_string (sig.in ());
// If the ior_output_file exists, output the ior to it
if (ior_output_file != 0)
@@ -237,10 +233,10 @@ int main (int argc, char* argv[])
}
CosNotifyChannelAdmin::SupplierAdmin_var admin =
- create_supplieradmin (ec.in () ACE_ENV_ARG_PARAMETER);
+ create_supplieradmin (ec.in ());
if (!CORBA::is_nil (admin.in ()))
{
- create_suppliers (admin.in (), client.root_poa () ACE_ENV_ARG_PARAMETER);
+ create_suppliers (admin.in (), client.root_poa ());
sig_impl->wait_for_startup();
@@ -248,7 +244,7 @@ int main (int argc, char* argv[])
for (int i = 0; i < num_batches; ++i)
{
ACE_DEBUG((LM_DEBUG, "+"));
- SendEvents (i ACE_ENV_ARG_PARAMETER);
+ SendEvents (i);
}
ACE_DEBUG((LM_DEBUG, "\nSupplier waiting for consumer...\n"));
@@ -262,12 +258,11 @@ int main (int argc, char* argv[])
}
}
}
- ACE_CATCH (CORBA::Exception, e)
+ catch (const CORBA::Exception& e)
{
- ACE_PRINT_EXCEPTION (e, "Error: Supplier exception: ");
+ e._tao_print_exception ("Error: Supplier exception: ");
status = 1;
}
- ACE_ENDTRY;
return status;
}