diff options
Diffstat (limited to 'TAO/orbsvcs/tests/Event/Mcast/Simple/consumer.cpp')
-rw-r--r-- | TAO/orbsvcs/tests/Event/Mcast/Simple/consumer.cpp | 33 |
1 files changed, 13 insertions, 20 deletions
diff --git a/TAO/orbsvcs/tests/Event/Mcast/Simple/consumer.cpp b/TAO/orbsvcs/tests/Event/Mcast/Simple/consumer.cpp index 1221a97921a..473802c28d6 100644 --- a/TAO/orbsvcs/tests/Event/Mcast/Simple/consumer.cpp +++ b/TAO/orbsvcs/tests/Event/Mcast/Simple/consumer.cpp @@ -18,8 +18,7 @@ public: /// PushConsumer methods. //@{ /// Logs each event. Initiates shutdown after receiving 100 events. - virtual void push (const RtecEventComm::EventSet &events - ACE_ENV_ARG_DECL) + virtual void push (const RtecEventComm::EventSet &events) ACE_THROW_SPEC ((CORBA::SystemException)); /// No-op. virtual void disconnect_push_consumer (void) @@ -49,8 +48,7 @@ EC_Consumer::EC_Consumer (CORBA::ORB_var orb, } void -EC_Consumer::push (const RtecEventComm::EventSet &events - ACE_ENV_ARG_DECL) +EC_Consumer::push (const RtecEventComm::EventSet &events) ACE_THROW_SPEC ((CORBA::SystemException)) { for (CORBA::ULong i = 0; i < events.length (); ++i) @@ -80,7 +78,7 @@ EC_Consumer::disconnect (void) this->ec_->destroy (); - this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER); + this->orb_->shutdown (0); } //////////////////////////////////////////////////////////// @@ -105,19 +103,19 @@ parse_args (int /* argc */, char ** /* argv */) int main (int argc, char *argv[]) { - ACE_TRY_NEW_ENV + try { // Initialize ORB and POA, POA Manager, parse args. CORBA::ORB_var orb = - CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER); + CORBA::ORB_init (argc, argv, ""); if (parse_args (argc, argv) == -1) return 1; CORBA::Object_var obj = - orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER); + orb->resolve_initial_references ("RootPOA"); PortableServer::POA_var poa = - PortableServer::POA::_narrow (obj.in () ACE_ENV_ARG_PARAMETER); + PortableServer::POA::_narrow (obj.in ()); if (check_for_nil (poa.in (), "POA") == -1) return 1; @@ -125,10 +123,9 @@ main (int argc, char *argv[]) poa->the_POAManager (); // Obtain reference to EC. - obj = orb->resolve_initial_references ("Event_Service" ACE_ENV_ARG_PARAMETER); + obj = orb->resolve_initial_references ("Event_Service"); RtecEventChannelAdmin::EventChannel_var ec = - RtecEventChannelAdmin::EventChannel::_narrow (obj.in () - ACE_ENV_ARG_PARAMETER); + RtecEventChannelAdmin::EventChannel::_narrow (obj.in ()); if (check_for_nil (ec.in (), "EC") == -1) return 1; @@ -144,8 +141,7 @@ main (int argc, char *argv[]) activate (consumer, poa.in (), consumer_impl.in (), - consumer_deactivator - ACE_ENV_ARG_PARAMETER); + consumer_deactivator); consumer_deactivator.disallow_deactivation (); // Obtain reference to ConsumerAdmin. @@ -160,8 +156,7 @@ main (int argc, char *argv[]) qos.start_disjunction_group (1); qos.insert_type (ACE_ES_EVENT_ANY, 0); supplier->connect_push_consumer (consumer.in (), - qos.get_ConsumerQOS () - ACE_ENV_ARG_PARAMETER); + qos.get_ConsumerQOS ()); // Allow processing of CORBA requests. manager->activate (); @@ -169,13 +164,11 @@ main (int argc, char *argv[]) // Receive events from EC. orb->run (); } - ACE_CATCHANY + catch (const CORBA::Exception& ex) { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Exception in Consumer:"); + ex._tao_print_exception ("Exception in Consumer:"); return 1; } - ACE_ENDTRY; return 0; } |