diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 2001-12-30 00:34:56 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 2001-12-30 00:34:56 +0000 |
commit | 66d7de1d32d6bc78df7d6997bb8c9b9b46a74cf1 (patch) | |
tree | a1957f9d64da9b319a88af0c704c2cc82f8b798b /TAO/orbsvcs/Notify_Service/Notify_Server.cpp | |
parent | b8111d84cd46feacc4c5047a8a701f993a808791 (diff) | |
download | ATCD-66d7de1d32d6bc78df7d6997bb8c9b9b46a74cf1.tar.gz |
ChangeLogTag:Sat Dec 29 12:08:40 2001 Balachandran Natarajan <bala@cs.wustl.edu>
Diffstat (limited to 'TAO/orbsvcs/Notify_Service/Notify_Server.cpp')
-rw-r--r-- | TAO/orbsvcs/Notify_Service/Notify_Server.cpp | 33 |
1 files changed, 13 insertions, 20 deletions
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; } |