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.cpp39
1 files changed, 22 insertions, 17 deletions
diff --git a/TAO/orbsvcs/Notify_Service/Notify_Service.cpp b/TAO/orbsvcs/Notify_Service/Notify_Service.cpp
index c61e71396ed..94b91b37409 100644
--- a/TAO/orbsvcs/Notify_Service/Notify_Service.cpp
+++ b/TAO/orbsvcs/Notify_Service/Notify_Service.cpp
@@ -10,9 +10,9 @@
#include "ace/Argv_Type_Converter.h"
#include "tao/ORB_Core.h"
#include "ace/Dynamic_Service.h"
-#include "../orbsvcs/Notify/Notify_Service.h"
+#include "../orbsvcs/Notify/Service.h"
-TAO_Notify_Service::TAO_Notify_Service (void)
+TAO_Notify_Service_Driver::TAO_Notify_Service_Driver (void)
: notify_service_ (0),
bootstrap_ (0),
use_name_svc_ (1),
@@ -25,14 +25,14 @@ TAO_Notify_Service::TAO_Notify_Service (void)
// No-Op.
}
-TAO_Notify_Service::~TAO_Notify_Service (void)
+TAO_Notify_Service_Driver::~TAO_Notify_Service_Driver (void)
{
if (ior_output_file_)
fclose(ior_output_file_);
}
int
-TAO_Notify_Service::init_ORB (int& argc, ACE_TCHAR *argv []
+TAO_Notify_Service_Driver::init_ORB (int& argc, ACE_TCHAR *argv []
ACE_ENV_ARG_DECL)
{
// Copy command line parameter.
@@ -44,14 +44,6 @@ TAO_Notify_Service::init_ORB (int& argc, ACE_TCHAR *argv []
ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (-1);
- this->notify_service_ = ACE_Dynamic_Service<TAO_NS_Service>::instance (TAO_NS_COS_NOTIFICATION_SERVICE_NAME);
-
- if (this->notify_service_ == 0)
- {
- ACE_DEBUG ((LM_DEBUG, "Service not found! check conf. file\n"));
- return -1;
- }
-
CORBA::Object_var object =
this->orb_->resolve_initial_references("RootPOA"
ACE_ENV_ARG_PARAMETER);
@@ -78,7 +70,7 @@ TAO_Notify_Service::init_ORB (int& argc, ACE_TCHAR *argv []
}
int
-TAO_Notify_Service::init (int argc, ACE_TCHAR *argv[]
+TAO_Notify_Service_Driver::init (int argc, ACE_TCHAR *argv[]
ACE_ENV_ARG_DECL)
{
// initalize the ORB.
@@ -86,6 +78,19 @@ TAO_Notify_Service::init (int argc, ACE_TCHAR *argv[]
ACE_ENV_ARG_PARAMETER) != 0)
return -1;
+ this->notify_service_ = ACE_Dynamic_Service<TAO_Notify_Service>::instance (TAO_NS_NOTIFICATION_SERVICE_NAME);
+
+ if (this->notify_service_ == 0)
+ {
+ this->notify_service_ = ACE_Dynamic_Service<TAO_Notify_Service>::instance (TAO_NOTIFY_DEF_EMO_FACTORY_NAME);
+ }
+
+ if (this->notify_service_ == 0)
+ {
+ ACE_DEBUG ((LM_DEBUG, "Service not found! check conf. file\n"));
+ return -1;
+ }
+
this->notify_service_->init (this->orb_.in () ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (-1);
@@ -252,7 +257,7 @@ TAO_Notify_Service::init (int argc, ACE_TCHAR *argv[]
}
int
-TAO_Notify_Service::resolve_naming_service (ACE_ENV_SINGLE_ARG_DECL)
+TAO_Notify_Service_Driver::resolve_naming_service (ACE_ENV_SINGLE_ARG_DECL)
{
CORBA::Object_var naming_obj =
this->orb_->resolve_initial_references ("NameService"
@@ -279,7 +284,7 @@ TAO_Notify_Service::resolve_naming_service (ACE_ENV_SINGLE_ARG_DECL)
}
int
-TAO_Notify_Service::run (ACE_ENV_SINGLE_ARG_DECL)
+TAO_Notify_Service_Driver::run (ACE_ENV_SINGLE_ARG_DECL)
{
if (TAO_debug_level > 0 )
ACE_DEBUG ((LM_DEBUG, "%s: Running the Notification Service\n",
@@ -298,7 +303,7 @@ TAO_Notify_Service::run (ACE_ENV_SINGLE_ARG_DECL)
}
void
-TAO_Notify_Service::shutdown (ACE_ENV_SINGLE_ARG_DECL)
+TAO_Notify_Service_Driver::shutdown (ACE_ENV_SINGLE_ARG_DECL)
{
// Deactivate.
if (this->use_name_svc_)
@@ -339,7 +344,7 @@ TAO_Notify_Service::shutdown (ACE_ENV_SINGLE_ARG_DECL)
}
int
-TAO_Notify_Service::parse_args (int argc, ACE_TCHAR *argv[])
+TAO_Notify_Service_Driver::parse_args (int argc, ACE_TCHAR *argv[])
{
ACE_Arg_Shifter arg_shifter (argc, argv);