summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/Notify_Service/Notify_Service.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/Notify_Service/Notify_Service.cpp')
-rw-r--r--TAO/orbsvcs/Notify_Service/Notify_Service.cpp110
1 files changed, 55 insertions, 55 deletions
diff --git a/TAO/orbsvcs/Notify_Service/Notify_Service.cpp b/TAO/orbsvcs/Notify_Service/Notify_Service.cpp
index b6d7d999dd6..4719d901afc 100644
--- a/TAO/orbsvcs/Notify_Service/Notify_Service.cpp
+++ b/TAO/orbsvcs/Notify_Service/Notify_Service.cpp
@@ -30,18 +30,18 @@ Notify_Service::~Notify_Service (void)
}
int
-Notify_Service::init_ORB (int& argc, char *argv [],
- CORBA::Environment &ACE_TRY_ENV)
+Notify_Service::init_ORB (int& argc, char *argv []
+ TAO_ENV_ARG_DECL)
{
this->orb_ = CORBA::ORB_init (argc,
argv,
- "",
- ACE_TRY_ENV);
+ ""
+ TAO_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (-1);
CORBA::Object_var poa_obj =
- this->orb_->resolve_initial_references("RootPOA",
- ACE_TRY_ENV);
+ this->orb_->resolve_initial_references("RootPOA"
+ TAO_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (-1);
if (CORBA::is_nil (poa_obj.in ()))
@@ -50,27 +50,27 @@ Notify_Service::init_ORB (int& argc, char *argv [],
-1);
this->poa_ =
- PortableServer::POA::_narrow (poa_obj.in (),
- ACE_TRY_ENV);
+ PortableServer::POA::_narrow (poa_obj.in ()
+ TAO_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (-1);
PortableServer::POAManager_var poa_manager =
- this->poa_->the_POAManager (ACE_TRY_ENV);
+ this->poa_->the_POAManager (TAO_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (-1);
- poa_manager->activate (ACE_TRY_ENV);
+ poa_manager->activate (TAO_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (-1);
return 0;
}
int
-Notify_Service::init (int argc, char *argv[],
- CORBA::Environment &ACE_TRY_ENV)
+Notify_Service::init (int argc, char *argv[]
+ TAO_ENV_ARG_DECL)
{
// initalize the ORB.
- if (this->init_ORB (argc, argv,
- ACE_TRY_ENV) != 0)
+ if (this->init_ORB (argc, argv
+ TAO_ENV_ARG_PARAMETER) != 0)
return -1;
ACE_CHECK_RETURN (-1);
@@ -92,7 +92,7 @@ Notify_Service::init (int argc, char *argv[],
if (this->use_name_svc_)
{
// Resolve the naming service.
- int ns_ret = this->resolve_naming_service (ACE_TRY_ENV);
+ int ns_ret = this->resolve_naming_service (TAO_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (-1);
if (ns_ret != 0)
@@ -104,15 +104,15 @@ Notify_Service::init (int argc, char *argv[],
// Activate the factory
this->notify_factory_ =
- TAO_Notify_EventChannelFactory_i::create (this->poa_.in (),
- ACE_TRY_ENV);
+ TAO_Notify_EventChannelFactory_i::create (this->poa_.in ()
+ TAO_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (-1);
ACE_ASSERT (!CORBA::is_nil (this->notify_factory_.in ()));
// Write IOR to a file, if asked.
CORBA::String_var str =
- this->orb_->object_to_string (this->notify_factory_.in (), ACE_TRY_ENV);
+ this->orb_->object_to_string (this->notify_factory_.in () TAO_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (-1);
if (this->ior_output_file_)
@@ -132,12 +132,12 @@ Notify_Service::init (int argc, char *argv[],
if (this->bootstrap_)
{
CORBA::Object_var table_object =
- this->orb_->resolve_initial_references ("IORTable",
- ACE_TRY_ENV);
+ this->orb_->resolve_initial_references ("IORTable"
+ TAO_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (-1);
IORTable::Table_var adapter =
- IORTable::Table::_narrow (table_object.in (), ACE_TRY_ENV);
+ IORTable::Table::_narrow (table_object.in () TAO_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (-1);
if (CORBA::is_nil (adapter.in ()))
{
@@ -146,11 +146,11 @@ Notify_Service::init (int argc, char *argv[],
else
{
CORBA::String_var ior =
- this->orb_->object_to_string (this->notify_factory_.in (),
- ACE_TRY_ENV);
+ this->orb_->object_to_string (this->notify_factory_.in ()
+ TAO_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (-1);
- adapter->bind (this->notify_factory_name_.c_str (), ior.in (),
- ACE_TRY_ENV);
+ adapter->bind (this->notify_factory_name_.c_str (), ior.in ()
+ TAO_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (-1);
}
}
@@ -162,14 +162,14 @@ Notify_Service::init (int argc, char *argv[],
ACE_ASSERT (!CORBA::is_nil (this->naming_.in ()));
CosNaming::Name_var name =
- this->naming_->to_name (this->notify_factory_name_.c_str (),
- ACE_TRY_ENV);
+ this->naming_->to_name (this->notify_factory_name_.c_str ()
+ TAO_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (-1);
this->naming_->rebind (name.in (),
- this->notify_factory_.in (),
- ACE_TRY_ENV);
+ this->notify_factory_.in ()
+ TAO_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (-1);
ACE_DEBUG ((LM_DEBUG,
@@ -187,17 +187,17 @@ Notify_Service::init (int argc, char *argv[],
CosNotifyChannelAdmin::EventChannel_var ec =
this->notify_factory_->create_channel (initial_qos,
initial_admin,
- id,
- ACE_TRY_ENV);
+ id
+ TAO_ENV_ARG_PARAMETER);
name = this->naming_->to_name (
- this->notify_channel_name_.c_str (),
- ACE_TRY_ENV);
+ this->notify_channel_name_.c_str ()
+ TAO_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (-1);
this->naming_->rebind (name.in (),
- ec.in (),
- ACE_TRY_ENV);
+ ec.in ()
+ TAO_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (-1);
ACE_DEBUG ((LM_DEBUG,
@@ -211,11 +211,11 @@ Notify_Service::init (int argc, char *argv[],
}
int
-Notify_Service::resolve_naming_service (CORBA::Environment &ACE_TRY_ENV)
+Notify_Service::resolve_naming_service (TAO_ENV_SINGLE_ARG_DECL)
{
CORBA::Object_var naming_obj =
- this->orb_->resolve_initial_references ("NameService",
- ACE_TRY_ENV);
+ this->orb_->resolve_initial_references ("NameService"
+ TAO_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (-1);
// Need to check return value for errors.
@@ -225,8 +225,8 @@ Notify_Service::resolve_naming_service (CORBA::Environment &ACE_TRY_ENV)
-1);
this->naming_ =
- CosNaming::NamingContextExt::_narrow (naming_obj.in (),
- ACE_TRY_ENV);
+ CosNaming::NamingContextExt::_narrow (naming_obj.in ()
+ TAO_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (-1);
return 0;
@@ -245,10 +245,10 @@ Notify_Service::run (void)
return 0;
}
- ACE_DECLARE_NEW_CORBA_ENV;
+ TAO_ENV_DECLARE_NEW_ENV;
ACE_TRY
{
- this->orb_->run (ACE_TRY_ENV);
+ this->orb_->run (TAO_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
}
ACE_CATCHANY
@@ -261,29 +261,29 @@ Notify_Service::run (void)
}
void
-Notify_Service::shutdown (CORBA::Environment &ACE_TRY_ENV)
+Notify_Service::shutdown (TAO_ENV_SINGLE_ARG_DECL)
{
// Deactivate.
PortableServer::ObjectId_var oid =
- this->poa_->reference_to_id (this->notify_factory_.in (),
- ACE_TRY_ENV);
+ this->poa_->reference_to_id (this->notify_factory_.in ()
+ TAO_ENV_ARG_PARAMETER);
ACE_CHECK;
// deactivate from the poa.
- this->poa_->deactivate_object (oid.in (),
- ACE_TRY_ENV);
+ this->poa_->deactivate_object (oid.in ()
+ TAO_ENV_ARG_PARAMETER);
ACE_CHECK;
if (this->use_name_svc_)
{
// Unbind from the naming service.
CosNaming::Name_var name =
- this->naming_->to_name (this->notify_factory_name_.c_str (),
- ACE_TRY_ENV);
+ this->naming_->to_name (this->notify_factory_name_.c_str ()
+ TAO_ENV_ARG_PARAMETER);
ACE_CHECK;
- this->naming_->unbind (name.in (),
- ACE_TRY_ENV);
+ this->naming_->unbind (name.in ()
+ TAO_ENV_ARG_PARAMETER);
ACE_CHECK;
}
@@ -393,10 +393,10 @@ Worker::orb (CORBA::ORB_ptr orb)
int
Worker::svc (void)
{
- ACE_DECLARE_NEW_CORBA_ENV;
+ TAO_ENV_DECLARE_NEW_ENV;
ACE_TRY
{
- this->orb_->run (ACE_TRY_ENV);
+ this->orb_->run (TAO_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
}
ACE_CATCHANY
@@ -422,8 +422,8 @@ main (int argc, char *argv[])
ACE_TRY_NEW_ENV
{
if (service.init (argc,
- argv,
- ACE_TRY_ENV) == -1)
+ argv
+ TAO_ENV_ARG_PARAMETER) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
"Failed to start the Notification Service.\n"),
1);