summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/Naming_Service/NT_Naming_Service.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/Naming_Service/NT_Naming_Service.cpp')
-rw-r--r--TAO/orbsvcs/Naming_Service/NT_Naming_Service.cpp28
1 files changed, 10 insertions, 18 deletions
diff --git a/TAO/orbsvcs/Naming_Service/NT_Naming_Service.cpp b/TAO/orbsvcs/Naming_Service/NT_Naming_Service.cpp
index 506d38edb32..2c1a9364ed6 100644
--- a/TAO/orbsvcs/Naming_Service/NT_Naming_Service.cpp
+++ b/TAO/orbsvcs/Naming_Service/NT_Naming_Service.cpp
@@ -22,7 +22,7 @@ AutoFinalizer::AutoFinalizer (TAO_NT_Naming_Service &service)
AutoFinalizer::~AutoFinalizer ()
{
- service_.report_status (SERVICE_STOPPED);
+ service_.report_status (SERVICE_STOPPED);
ACE_DEBUG ((LM_DEBUG, "Reported service stoped\n"));
}
@@ -52,31 +52,28 @@ TAO_NT_Naming_Service::handle_control (DWORD control_code)
if (control_code == SERVICE_CONTROL_SHUTDOWN
|| control_code == SERVICE_CONTROL_STOP)
{
- // Just in case any of the following method calls
+ // Just in case any of the following method calls
// throws in a way we do not expect.
// This instance's destructor will notify the OS.
AutoFinalizer afinalizer (*this);
report_status (SERVICE_STOP_PENDING);
-
+
// This must be all that needs to be done since this method is executing
// in a separate thread from the one running the reactor.
// When the reactor is stopped it calls ORB::destroy(), which in turn
// calls ORB::shutdown(1) *and* unbinds the ORB from the ORB table.
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
+ try
{
- TAO_ORB_Core_instance ()->orb ()->shutdown (1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ TAO_ORB_Core_instance ()->orb ()->shutdown (1);
}
- ACE_CATCHANY
+ catch (const CORBA::Exception&)
{
// What should we do here? Even the log messages are not
// showing up, since the thread that runs this is not an ACE
// thread. It is allways spawned/controlled by Windows ...
}
- ACE_ENDTRY;
}
else
{
@@ -168,8 +165,7 @@ TAO_NT_Naming_Service::svc (void)
argv_) == -1)
return -1;
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
+ try
{
// Just in case handle_control does not get the chance
// to execute, or is never called by Windows. This instance's
@@ -179,18 +175,14 @@ TAO_NT_Naming_Service::svc (void)
ACE_DEBUG ((LM_INFO, "Notifying Windows of service startup\n"));
report_status (SERVICE_RUNNING);
- naming_service.run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ naming_service.run ();
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
ACE_DEBUG ((LM_INFO, "Exception in service - exitting\n"));
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "TAO NT Naming Service");
+ ex._tao_print_exception ("TAO NT Naming Service");
return -1;
}
- ACE_ENDTRY;
- ACE_CHECK_RETURN (1);
ACE_DEBUG ((LM_INFO, "Exiting gracefully\n"));
return 0;