diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2007-01-24 15:39:09 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2007-01-24 15:39:09 +0000 |
commit | c801f87e59c00f72bdeb5ce7bd0d276674665bac (patch) | |
tree | 70bff03d1cf156ecf05ee4c5c338d8ce423e64ee /TAO/orbsvcs/examples/CosEC/Simple/Supplier.cpp | |
parent | 98c0b37d4714ff774fc3ada8c9ee893c719af714 (diff) | |
download | ATCD-c801f87e59c00f72bdeb5ce7bd0d276674665bac.tar.gz |
Wed Jan 24 14:00:12 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'TAO/orbsvcs/examples/CosEC/Simple/Supplier.cpp')
-rw-r--r-- | TAO/orbsvcs/examples/CosEC/Simple/Supplier.cpp | 33 |
1 files changed, 8 insertions, 25 deletions
diff --git a/TAO/orbsvcs/examples/CosEC/Simple/Supplier.cpp b/TAO/orbsvcs/examples/CosEC/Simple/Supplier.cpp index 3886f6d085a..51c8024d371 100644 --- a/TAO/orbsvcs/examples/CosEC/Simple/Supplier.cpp +++ b/TAO/orbsvcs/examples/CosEC/Simple/Supplier.cpp @@ -31,7 +31,6 @@ Supplier::run (int argc, char* argv[]) // ORB initialization boiler plate... CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; if (argc <= 1) { @@ -42,43 +41,33 @@ Supplier::run (int argc, char* argv[]) CORBA::Object_var object = orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; PortableServer::POA_var poa = PortableServer::POA::_narrow (object.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; PortableServer::POAManager_var poa_manager = - poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + poa->the_POAManager (); + poa_manager->activate (); // Obtain the event channel, we could use a naming service, a // command line argument or resolve_initial_references(), but // this is simpler... object = orb->string_to_object (argv[1] ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; CosEventChannelAdmin::EventChannel_var event_channel = CosEventChannelAdmin::EventChannel::_narrow (object.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // The canonical protocol to connect to the EC CosEventChannelAdmin::SupplierAdmin_var supplier_admin = - event_channel->for_suppliers (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + event_channel->for_suppliers (); CosEventChannelAdmin::ProxyPushConsumer_var consumer = - supplier_admin->obtain_push_consumer (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + supplier_admin->obtain_push_consumer (); CosEventComm::PushSupplier_var supplier = - this->_this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + this->_this (); consumer->connect_push_supplier (supplier.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Push the events... ACE_Time_Value sleep_time (0, 10000); // 10 milliseconds @@ -89,28 +78,22 @@ Supplier::run (int argc, char* argv[]) for (int i = 0; i != 2000; ++i) { consumer->push (event ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; ACE_OS::sleep (sleep_time); } // Disconnect from the EC - consumer->disconnect_push_consumer (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + consumer->disconnect_push_consumer (); // Destroy the EC.... - event_channel->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + event_channel->destroy (); // Deactivate this object... PortableServer::ObjectId_var id = poa->servant_to_id (this ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; poa->deactivate_object (id.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Destroy the POA poa->destroy (1, 0 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; } ACE_CATCHANY { @@ -122,7 +105,7 @@ Supplier::run (int argc, char* argv[]) } void -Supplier::disconnect_push_supplier (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +Supplier::disconnect_push_supplier (void) ACE_THROW_SPEC ((CORBA::SystemException)) { } |