summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/Logging_Service/Notify_Logging_Service/Notify_Logging_Service.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/Logging_Service/Notify_Logging_Service/Notify_Logging_Service.cpp')
-rw-r--r--TAO/orbsvcs/Logging_Service/Notify_Logging_Service/Notify_Logging_Service.cpp85
1 files changed, 26 insertions, 59 deletions
diff --git a/TAO/orbsvcs/Logging_Service/Notify_Logging_Service/Notify_Logging_Service.cpp b/TAO/orbsvcs/Logging_Service/Notify_Logging_Service/Notify_Logging_Service.cpp
index 00f6f2e038d..8de11dd73a0 100644
--- a/TAO/orbsvcs/Logging_Service/Notify_Logging_Service/Notify_Logging_Service.cpp
+++ b/TAO/orbsvcs/Logging_Service/Notify_Logging_Service/Notify_Logging_Service.cpp
@@ -28,14 +28,11 @@ Notify_Logging_Service::~Notify_Logging_Service (void)
}
int
-Notify_Logging_Service::init_ORB (int& argc, char *argv []
- ACE_ENV_ARG_DECL)
+Notify_Logging_Service::init_ORB (int& argc, char *argv [])
{
this->orb_ = CORBA::ORB_init (argc,
argv,
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
+ "");
this->notify_service_ = ACE_Dynamic_Service<TAO_Notify_Service>::instance (TAO_NOTIFY_DEF_EMO_FACTORY_NAME);
@@ -46,9 +43,7 @@ Notify_Logging_Service::init_ORB (int& argc, char *argv []
}
CORBA::Object_var poa_object =
- this->orb_->resolve_initial_references("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
+ this->orb_->resolve_initial_references("RootPOA");
if (CORBA::is_nil (poa_object.in ()))
ACE_ERROR_RETURN ((LM_ERROR,
@@ -56,16 +51,12 @@ Notify_Logging_Service::init_ORB (int& argc, char *argv []
-1);
this->poa_ =
- PortableServer::POA::_narrow (poa_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
+ PortableServer::POA::_narrow (poa_object.in ());
PortableServer::POAManager_var poa_manager =
- this->poa_->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
+ this->poa_->the_POAManager ();
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
+ poa_manager->activate ();
return 0;
}
@@ -119,24 +110,20 @@ Notify_Logging_Service::parse_args (int argc, char *argv[])
}
int
-Notify_Logging_Service::init (int argc, char *argv[]
- ACE_ENV_ARG_DECL)
+Notify_Logging_Service::init (int argc, char *argv[])
{
// initialize the ORB.
- if (this->init_ORB (argc, argv
- ACE_ENV_ARG_PARAMETER) != 0)
+ if (this->init_ORB (argc, argv) != 0)
return -1;
if (this->parse_args (argc, argv) == -1)
return -1;
- this->notify_service_->init_service (this->orb_.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
+ this->notify_service_->init_service (this->orb_.in ());
// Activate the factory
this->notify_factory_ =
- notify_service_->create (this->poa_.in ()
- ACE_ENV_ARG_PARAMETER);
+ notify_service_->create (this->poa_.in ());
ACE_NEW_THROW_EX (this->notify_log_factory_,
TAO_NotifyLogFactory_i (this->notify_factory_.in ()),
@@ -144,28 +131,21 @@ Notify_Logging_Service::init (int argc, char *argv[]
DsNotifyLogAdmin::NotifyLogFactory_var obj =
notify_log_factory_->activate (this->orb_.in (),
- this->poa_.in ()
- ACE_ENV_ARG_PARAMETER);
+ this->poa_.in ());
- ACE_CHECK_RETURN (-1);
CORBA::String_var ior =
- this->orb_->object_to_string (obj.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
+ this->orb_->object_to_string (obj.in ());
if (true)
{
CORBA::Object_var table_object =
- this->orb_->resolve_initial_references ("IORTable"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
+ this->orb_->resolve_initial_references ("IORTable");
IORTable::Table_var adapter =
IORTable::Table::_narrow (table_object.in ());
- ACE_CHECK_RETURN (-1);
adapter->bind("NotifyLogService", ior.in ());
- ACE_CHECK_RETURN (-1);
}
if (this->ior_file_name_ != 0)
@@ -198,42 +178,35 @@ Notify_Logging_Service::init (int argc, char *argv[]
if (this->bind_to_naming_service_)
{
// Resolve the naming service.
- this->resolve_naming_service (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
+ this->resolve_naming_service ();
CosNaming::Name name (1);
name.length (1);
name[0].id = CORBA::string_dup (this->service_name_);
this->naming_->rebind (name,
- obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
+ obj.in ());
}
return 0;
}
void
-Notify_Logging_Service::resolve_naming_service (ACE_ENV_SINGLE_ARG_DECL)
+Notify_Logging_Service::resolve_naming_service (void)
{
CORBA::Object_var naming_obj =
- this->orb_->resolve_initial_references ("NameService"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+ this->orb_->resolve_initial_references ("NameService");
// Need to check return value for errors.
if (CORBA::is_nil (naming_obj.in ()))
- ACE_THROW (CORBA::UNKNOWN ());
+ throw CORBA::UNKNOWN ();
this->naming_ =
- CosNaming::NamingContext::_narrow (naming_obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+ CosNaming::NamingContext::_narrow (naming_obj.in ());
}
int
-Notify_Logging_Service::run (ACE_ENV_SINGLE_ARG_DECL)
+Notify_Logging_Service::run (void)
{
if (this->nthreads_ > 0)
{
@@ -244,8 +217,7 @@ Notify_Logging_Service::run (ACE_ENV_SINGLE_ARG_DECL)
return 0;
}
- this->orb_->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
+ this->orb_->run ();
return 0;
}
@@ -253,23 +225,20 @@ Notify_Logging_Service::run (ACE_ENV_SINGLE_ARG_DECL)
int
Notify_Logging_Service::svc (void)
{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
+ try
{
- this->orb_->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ this->orb_->run ();
}
- ACE_CATCHANY
+ catch (const CORBA::Exception&)
{
return -1;
}
- ACE_ENDTRY;
return 0;
}
void
-Notify_Logging_Service::shutdown (ACE_ENV_SINGLE_ARG_DECL)
+Notify_Logging_Service::shutdown (void)
{
if (this->bind_to_naming_service_)
{
@@ -277,9 +246,7 @@ Notify_Logging_Service::shutdown (ACE_ENV_SINGLE_ARG_DECL)
name.length (1);
name[0].id = CORBA::string_dup (this->service_name_);
- this->naming_->unbind (name
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+ this->naming_->unbind (name);
}
// shutdown the ORB.