summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/examples/Notify/ThreadPool/Consumer_Client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/examples/Notify/ThreadPool/Consumer_Client.cpp')
-rw-r--r--TAO/orbsvcs/examples/Notify/ThreadPool/Consumer_Client.cpp42
1 files changed, 12 insertions, 30 deletions
diff --git a/TAO/orbsvcs/examples/Notify/ThreadPool/Consumer_Client.cpp b/TAO/orbsvcs/examples/Notify/ThreadPool/Consumer_Client.cpp
index 480dbb5005c..d97ec85e0c5 100644
--- a/TAO/orbsvcs/examples/Notify/ThreadPool/Consumer_Client.cpp
+++ b/TAO/orbsvcs/examples/Notify/ThreadPool/Consumer_Client.cpp
@@ -62,29 +62,24 @@ TAO_Notify_ThreadPool_Consumer_Client::parse_args (int argc, char *argv[])
}
void
-TAO_Notify_ThreadPool_Consumer_Client::_init (ACE_ENV_SINGLE_ARG_DECL)
+TAO_Notify_ThreadPool_Consumer_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 ();
// Resolve the Notification Factory.
- CosNotifyChannelAdmin::EventChannelFactory_var ecf = this->orb_objects_.notify_factory (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
+ CosNotifyChannelAdmin::EventChannelFactory_var ecf = this->orb_objects_.notify_factory ();
// Find the EventChannel created by the supplier.
- CosNotifyChannelAdmin::ChannelIDSeq_var channel_seq = ecf->get_all_channels (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
+ CosNotifyChannelAdmin::ChannelIDSeq_var channel_seq = ecf->get_all_channels ();
CosNotifyChannelAdmin::EventChannel_var ec;
if (channel_seq->length() > 0)
{
ec = ecf->get_event_channel (channel_seq[0] ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
}
else
{
@@ -97,12 +92,10 @@ TAO_Notify_ThreadPool_Consumer_Client::_init (ACE_ENV_SINGLE_ARG_DECL)
CosNotifyChannelAdmin::ConsumerAdmin_var consumer_admin =
ec->new_for_consumers (CosNotifyChannelAdmin::AND_OP, adminid ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
ACE_ASSERT (!CORBA::is_nil (consumer_admin.in ()));
- PortableServer::POA_var rt_poa = this->create_rt_poa (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
+ PortableServer::POA_var rt_poa = this->create_rt_poa ();
// Create a Consumer
this->consumer_ = new TAO_Notify_ThreadPool_Consumer (this->orb_objects_);
@@ -112,7 +105,7 @@ TAO_Notify_ThreadPool_Consumer_Client::_init (ACE_ENV_SINGLE_ARG_DECL)
}
PortableServer::POA_ptr
-TAO_Notify_ThreadPool_Consumer_Client::create_rt_poa (ACE_ENV_SINGLE_ARG_DECL)
+TAO_Notify_ThreadPool_Consumer_Client::create_rt_poa (void)
{
PortableServer::POA_var rt_poa;
@@ -122,14 +115,12 @@ TAO_Notify_ThreadPool_Consumer_Client::create_rt_poa (ACE_ENV_SINGLE_ARG_DECL)
CORBA::Policy_var activation_policy =
this->orb_objects_.root_poa_->create_implicit_activation_policy (PortableServer::IMPLICIT_ACTIVATION ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (rt_poa._retn ());
// Create a priority model policy.
priority_model_policy =
this->orb_objects_.rt_orb_->create_priority_model_policy (RTCORBA::CLIENT_PROPAGATED
, 0
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (rt_poa._retn ());
CORBA::ULong stacksize = 0;
CORBA::ULong static_threads = 1;
@@ -149,12 +140,10 @@ TAO_Notify_ThreadPool_Consumer_Client::create_rt_poa (ACE_ENV_SINGLE_ARG_DECL)
max_buffered_requests,
max_request_buffer_size
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (rt_poa._retn ());
thread_pool_policy =
this->orb_objects_.rt_orb_->create_threadpool_policy (threadpool_id
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (rt_poa._retn ());
CORBA::PolicyList poa_policy_list;
@@ -164,22 +153,20 @@ TAO_Notify_ThreadPool_Consumer_Client::create_rt_poa (ACE_ENV_SINGLE_ARG_DECL)
poa_policy_list[2] = thread_pool_policy;
PortableServer::POAManager_var poa_manager =
- this->orb_objects_.root_poa_->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (rt_poa._retn ());
+ this->orb_objects_.root_poa_->the_POAManager ();
rt_poa = this->orb_objects_.root_poa_->create_POA ("RT POA!",
poa_manager.in (),
poa_policy_list
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (rt_poa._retn ());
return rt_poa._retn ();
}
void
-TAO_Notify_ThreadPool_Consumer_Client::run (ACE_ENV_SINGLE_ARG_DECL)
+TAO_Notify_ThreadPool_Consumer_Client::run (void)
{
- this->consumer_->run (ACE_ENV_SINGLE_ARG_PARAMETER);
+ this->consumer_->run ();
}
void
@@ -195,13 +182,10 @@ TAO_Notify_ThreadPool_Consumer_Client::svc (void)
{
// Initialize this threads priority.
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
{
@@ -224,12 +208,10 @@ main (int argc, char *argv [])
argv,
""
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
TAO_Notify_ORB_Objects orb_objects;
orb_objects.init (orb ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
TAO_Notify_ORB_Run_Task orb_run_task (orb_objects);