summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/tests/Event/Mcast/Simple
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/tests/Event/Mcast/Simple')
-rw-r--r--TAO/orbsvcs/tests/Event/Mcast/Simple/consumer.cpp36
-rw-r--r--TAO/orbsvcs/tests/Event/Mcast/Simple/supplier.cpp15
2 files changed, 14 insertions, 37 deletions
diff --git a/TAO/orbsvcs/tests/Event/Mcast/Simple/consumer.cpp b/TAO/orbsvcs/tests/Event/Mcast/Simple/consumer.cpp
index 7b95c67318f..1221a97921a 100644
--- a/TAO/orbsvcs/tests/Event/Mcast/Simple/consumer.cpp
+++ b/TAO/orbsvcs/tests/Event/Mcast/Simple/consumer.cpp
@@ -22,7 +22,7 @@ public:
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException));
/// No-op.
- virtual void disconnect_push_consumer (ACE_ENV_SINGLE_ARG_DECL)
+ virtual void disconnect_push_consumer (void)
ACE_THROW_SPEC ((CORBA::SystemException));
//@}
@@ -30,7 +30,7 @@ private:
/// Helper - destroys EC, shutdowns the ORB and prints number of
/// events received.
- void disconnect (ACE_ENV_SINGLE_ARG_DECL);
+ void disconnect (void);
/// Number of events pushed to us by EC.
size_t n_events_;
@@ -60,17 +60,17 @@ EC_Consumer::push (const RtecEventComm::EventSet &events
}
if (this->n_events_ >= 100)
- this->disconnect (ACE_ENV_SINGLE_ARG_PARAMETER);
+ this->disconnect ();
}
void
-EC_Consumer::disconnect_push_consumer (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+EC_Consumer::disconnect_push_consumer (void)
ACE_THROW_SPEC ((CORBA::SystemException))
{
}
void
-EC_Consumer::disconnect (ACE_ENV_SINGLE_ARG_DECL)
+EC_Consumer::disconnect (void)
{
if (this->n_events_ == 100)
{
@@ -78,11 +78,9 @@ EC_Consumer::disconnect (ACE_ENV_SINGLE_ARG_DECL)
"SUCCESS: consumer received 100 events, as expected\n"));
}
- this->ec_->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
+ this->ec_->destroy ();
this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
}
////////////////////////////////////////////////////////////
@@ -112,31 +110,25 @@ main (int argc, char *argv[])
// Initialize ORB and POA, POA Manager, parse args.
CORBA::ORB_var orb =
CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
if (parse_args (argc, argv) == -1)
return 1;
CORBA::Object_var obj =
orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
PortableServer::POA_var poa =
PortableServer::POA::_narrow (obj.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
if (check_for_nil (poa.in (), "POA") == -1)
return 1;
PortableServer::POAManager_var manager =
- poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ poa->the_POAManager ();
// Obtain reference to EC.
obj = orb->resolve_initial_references ("Event_Service" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
RtecEventChannelAdmin::EventChannel_var ec =
RtecEventChannelAdmin::EventChannel::_narrow (obj.in ()
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
if (check_for_nil (ec.in (), "EC") == -1)
return 1;
@@ -154,18 +146,15 @@ main (int argc, char *argv[])
consumer_impl.in (),
consumer_deactivator
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
consumer_deactivator.disallow_deactivation ();
// Obtain reference to ConsumerAdmin.
RtecEventChannelAdmin::ConsumerAdmin_var consumer_admin =
- ec->for_consumers (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ ec->for_consumers ();
// Obtain ProxyPushSupplier and connect this consumer.
RtecEventChannelAdmin::ProxyPushSupplier_var supplier =
- consumer_admin->obtain_push_supplier (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ consumer_admin->obtain_push_supplier ();
ACE_ConsumerQOS_Factory qos;
qos.start_disjunction_group (1);
@@ -173,15 +162,12 @@ main (int argc, char *argv[])
supplier->connect_push_consumer (consumer.in (),
qos.get_ConsumerQOS ()
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
// Allow processing of CORBA requests.
- manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ manager->activate ();
// Receive events from EC.
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ orb->run ();
}
ACE_CATCHANY
{
diff --git a/TAO/orbsvcs/tests/Event/Mcast/Simple/supplier.cpp b/TAO/orbsvcs/tests/Event/Mcast/Simple/supplier.cpp
index d7d0b4f1973..307e6176a95 100644
--- a/TAO/orbsvcs/tests/Event/Mcast/Simple/supplier.cpp
+++ b/TAO/orbsvcs/tests/Event/Mcast/Simple/supplier.cpp
@@ -21,7 +21,6 @@ send_events (RtecEventChannelAdmin::ProxyPushConsumer_ptr consumer
for (int i = 0; i < 100; ++i)
{
consumer->push (events ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
}
}
@@ -51,7 +50,6 @@ main (int argc, char *argv[])
// Initialize ORB and parse args.
CORBA::ORB_var orb =
CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
if (parse_args (argc, argv) == -1)
return 1;
@@ -59,23 +57,19 @@ main (int argc, char *argv[])
// Obtain reference to EC.
CORBA::Object_var obj =
orb->resolve_initial_references ("Event_Service" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
RtecEventChannelAdmin::EventChannel_var ec =
RtecEventChannelAdmin::EventChannel::_narrow (obj.in ()
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
if (check_for_nil (ec.in (), "EC") == -1)
return 1;
// Obtain reference to SupplierAdmin.
RtecEventChannelAdmin::SupplierAdmin_var supplier_admin =
- ec->for_suppliers (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ ec->for_suppliers ();
// Obtain ProxyPushConsumer and connect this supplier.
RtecEventChannelAdmin::ProxyPushConsumer_var consumer =
- supplier_admin->obtain_push_consumer (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ supplier_admin->obtain_push_consumer ();
ACE_SupplierQOS_Factory qos;
qos.insert (SOURCE_ID, EVENT_TYPE, 0, 1);
@@ -84,15 +78,12 @@ main (int argc, char *argv[])
(RtecEventComm::PushSupplier::_nil (),
qos.get_SupplierQOS ()
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
// Send 100 events to EC.
send_events (consumer.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
// Tell EC to shut down.
- ec->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ ec->destroy ();
}
ACE_CATCHANY