summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TAO/ChangeLogs/ChangeLog-02a7
-rw-r--r--TAO/orbsvcs/Naming_Service/Naming_Server.cpp4
-rw-r--r--TAO/orbsvcs/Notify_Service/Notify_Server.cpp33
3 files changed, 23 insertions, 21 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a
index 879e0e07fa2..429c534611f 100644
--- a/TAO/ChangeLogs/ChangeLog-02a
+++ b/TAO/ChangeLogs/ChangeLog-02a
@@ -1,3 +1,10 @@
+Sat Dec 29 18:32:03 2001 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
+
+ * orbsvcs/Notify_Service/Notify_Server.cpp (main): Cleaned up the
+ exception handling code to match the same format used in the
+ ../Naming_Service/Naming_Server.cpp. Thanks to Venkita for
+ reporting this.
+
Sat Dec 29 15:53:30 2001 Douglas C. Schmidt <schmidt@macarena.cs.wustl.edu>
* orbsvcs/Notify_Service/Makefile: Updated the Makefile to
diff --git a/TAO/orbsvcs/Naming_Service/Naming_Server.cpp b/TAO/orbsvcs/Naming_Service/Naming_Server.cpp
index 23dff06b24e..6086e92078e 100644
--- a/TAO/orbsvcs/Naming_Service/Naming_Server.cpp
+++ b/TAO/orbsvcs/Naming_Service/Naming_Server.cpp
@@ -10,7 +10,9 @@ main (int argc, char *argv[])
TAO_Naming_Service naming_service;
if (naming_service.init (argc, argv) == -1)
- return 1;
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Failed to start the Naming Service.\n"),
+ 1);
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
diff --git a/TAO/orbsvcs/Notify_Service/Notify_Server.cpp b/TAO/orbsvcs/Notify_Service/Notify_Server.cpp
index 4ba9c67c756..b5e0c04fcb9 100644
--- a/TAO/orbsvcs/Notify_Service/Notify_Server.cpp
+++ b/TAO/orbsvcs/Notify_Service/Notify_Server.cpp
@@ -12,41 +12,34 @@
int
main (int argc, char *argv[])
{
- // Init Factories
+ // Init factories.
TAO_Notify_Default_CO_Factory::init_svc ();
TAO_Notify_Default_POA_Factory::init_svc ();
TAO_Notify_Default_Collection_Factory::init_svc ();
TAO_Notify_Default_EMO_Factory::init_svc ();
- TAO_Notify_Service service;
+ TAO_Notify_Service notify_service;
- ACE_TRY_NEW_ENV
- {
- if (service.init (argc,
- argv,
- ACE_TRY_ENV) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Failed to start the Notification Service.\n"),
- 1);
- ACE_TRY_CHECK;
+ if (notify_service.init (argc, argv) == -1)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Failed to start the Notification Service.\n"),
+ 1);
- if (service.run () == -1)
- {
- service.shutdown ();
- ACE_ERROR_RETURN ((LM_ERROR,
- "Failed to run the Notification Service.\n"),
- 1);
- }
+ ACE_DECLARE_NEW_CORBA_ENV;
+ ACE_TRY
+ {
+ notify_service.run (TAO_ENV_SINGLE_ARG_PARAMETER);
+ notify_service.shutdown (TAO_ENV_SINGLE_ARG_PARAMETER);
}
ACE_CATCHANY
{
+ notify_service.shutdown (TAO_ENV_SINGLE_ARG_PARAMETER);
ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
"Failed to start the Notification Service\n");
return 1;
}
ACE_ENDTRY;
-
- service.shutdown ();
+ ACE_CHECK_RETURN (1);
return 0;
}