diff options
Diffstat (limited to 'TAO/orbsvcs/examples/Notify/ThreadPool/Supplier_Client.cpp')
-rw-r--r-- | TAO/orbsvcs/examples/Notify/ThreadPool/Supplier_Client.cpp | 41 |
1 files changed, 13 insertions, 28 deletions
diff --git a/TAO/orbsvcs/examples/Notify/ThreadPool/Supplier_Client.cpp b/TAO/orbsvcs/examples/Notify/ThreadPool/Supplier_Client.cpp index fb8dcf0c8ad..77d7f498645 100644 --- a/TAO/orbsvcs/examples/Notify/ThreadPool/Supplier_Client.cpp +++ b/TAO/orbsvcs/examples/Notify/ThreadPool/Supplier_Client.cpp @@ -80,24 +80,20 @@ TAO_Notify_ThreadPool_Supplier_Client::parse_args (int argc, char *argv[]) } void -TAO_Notify_ThreadPool_Supplier_Client::_init (ACE_ENV_SINGLE_ARG_DECL) +TAO_Notify_ThreadPool_Supplier_Client::_init (void) { PortableServer::POAManager_var poa_manager = - this->orb_objects_.root_poa_->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + this->orb_objects_.root_poa_->the_POAManager (); - poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + poa_manager->activate (); - CosNotifyChannelAdmin::EventChannel_var ec = this->create_ec (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + CosNotifyChannelAdmin::EventChannel_var ec = this->create_ec (); // Create a Supplier Admin CosNotifyChannelAdmin::AdminID adminid = 0; CosNotifyChannelAdmin::SupplierAdmin_var supplier_admin = ec->new_for_suppliers (CosNotifyChannelAdmin::AND_OP, adminid ACE_ENV_ARG_PARAMETER); - ACE_CHECK; ACE_ASSERT (!CORBA::is_nil (supplier_admin.in ())); @@ -110,12 +106,11 @@ TAO_Notify_ThreadPool_Supplier_Client::_init (ACE_ENV_SINGLE_ARG_DECL) } CosNotifyChannelAdmin::EventChannel_ptr -TAO_Notify_ThreadPool_Supplier_Client::create_ec (ACE_ENV_SINGLE_ARG_DECL) +TAO_Notify_ThreadPool_Supplier_Client::create_ec (void) { CosNotifyChannelAdmin::EventChannel_var ec; - CosNotifyChannelAdmin::EventChannelFactory_var ecf = this->orb_objects_.notify_factory (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (ec._retn ()); + CosNotifyChannelAdmin::EventChannelFactory_var ecf = this->orb_objects_.notify_factory (); // Create an EventChannel CosNotification::QoSProperties qos; @@ -128,7 +123,6 @@ TAO_Notify_ThreadPool_Supplier_Client::create_ec (ACE_ENV_SINGLE_ARG_DECL) admin, id ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (ec._retn ()); // Set the Qos // See $TAO_ROOT/orbsvcs/orbsvcs/NotifyExt.idl @@ -144,7 +138,6 @@ TAO_Notify_ThreadPool_Supplier_Client::create_ec (ACE_ENV_SINGLE_ARG_DECL) // Note that instead of <set_qos>, the <qos> can also be passed while creating the channel. ec->set_qos (qos ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (ec._retn ()); } ACE_DEBUG ((LM_DEBUG, "(%P,%t) Created Event Channel with %d threads\n", this->ec_thread_count_)); @@ -153,20 +146,18 @@ TAO_Notify_ThreadPool_Supplier_Client::create_ec (ACE_ENV_SINGLE_ARG_DECL) } void -TAO_Notify_ThreadPool_Supplier_Client::run (ACE_ENV_SINGLE_ARG_DECL) +TAO_Notify_ThreadPool_Supplier_Client::run (void) { /// First, signal that the supplier is ready. - this->write_ior (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + this->write_ior (); - this->supplier_->run (ACE_ENV_SINGLE_ARG_PARAMETER); + this->supplier_->run (); } void -TAO_Notify_ThreadPool_Supplier_Client::write_ior (ACE_ENV_SINGLE_ARG_DECL) +TAO_Notify_ThreadPool_Supplier_Client::write_ior (void) { - CosNotifyComm::StructuredPushSupplier_var objref = this->supplier_->_this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + CosNotifyComm::StructuredPushSupplier_var objref = this->supplier_->_this (); // Write the ior to a file to signal waiting consumers. FILE *ior_output_file = ACE_OS::fopen (this->ior_file_name_.c_str (), ACE_TEXT("w")); @@ -175,7 +166,6 @@ TAO_Notify_ThreadPool_Supplier_Client::write_ior (ACE_ENV_SINGLE_ARG_DECL) { CORBA::String_var str = this->orb_objects_.orb_->object_to_string (objref.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; ACE_OS::fprintf (ior_output_file, "%s", @@ -190,13 +180,10 @@ TAO_Notify_ThreadPool_Supplier_Client::svc (void) ACE_TRY_NEW_ENV { this->orb_objects_.current_->the_priority (0 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - this->_init (ACE_ENV_SINGLE_ARG_PARAMETER); //Init the Client - ACE_TRY_CHECK; + this->_init (); //Init the Client - this->run (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + this->run (); } ACE_CATCHANY { @@ -219,13 +206,11 @@ main (int argc, char *argv []) argv, "" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Create a holder for the common ORB Objects. TAO_Notify_ORB_Objects orb_objects; orb_objects.init (orb ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; /* Run the ORB in a seperate thread */ TAO_Notify_ORB_Run_Task orb_run_task (orb_objects); |