summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/Notify_Service/Notify_Server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/Notify_Service/Notify_Server.cpp')
-rw-r--r--TAO/orbsvcs/Notify_Service/Notify_Server.cpp24
1 files changed, 14 insertions, 10 deletions
diff --git a/TAO/orbsvcs/Notify_Service/Notify_Server.cpp b/TAO/orbsvcs/Notify_Service/Notify_Server.cpp
index 2e74141b15d..aa652e311fe 100644
--- a/TAO/orbsvcs/Notify_Service/Notify_Server.cpp
+++ b/TAO/orbsvcs/Notify_Service/Notify_Server.cpp
@@ -1,6 +1,7 @@
// $Id$
#include "Notify_Service.h"
+#include "orbsvcs/orbsvcs/Notify/Properties.h"
// Must include this file to get a static initializer
#include "tao/Valuetype/Valuetype_Adapter_Impl.h"
@@ -47,27 +48,30 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[])
Notify_Service_Shutdown_Functor killer (notify_service);
Service_Shutdown kill_contractor (killer);
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY_NEW_ENV
+ try
{
- int result = notify_service.init (argc, argv ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ // Set the properties instance before initializing the notify
+ // service. Using the static singleton can cause static
+ // destruction issues between the properties instance and
+ // statically allocated type code structures.
+ TAO_Notify_Properties properties;
+ TAO_Notify_Properties::instance (&properties);
+
+ int result = notify_service.init (argc, argv);
if (result == -1)
ACE_ERROR_RETURN ((LM_ERROR,
ACE_TEXT("Failed to initialize the Notification Service.\n")),
1);
- notify_service.run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ notify_service.run ();
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- ACE_TEXT("Failed to run the Notification Service\n"));
+ ex._tao_print_exception (
+ ACE_TEXT ("Failed to run the Notification Service\n"));
return 1;
}
- ACE_ENDTRY;
return 0;
}