summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/Naming_Service
diff options
context:
space:
mode:
authorelliott_c <elliott_c@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2007-01-25 18:04:11 +0000
committerelliott_c <elliott_c@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2007-01-25 18:04:11 +0000
commitc979767a00db4ea1299af482033a68829cc16675 (patch)
tree3e959cad0a053f1adad663e7c02bc7a239f383d8 /TAO/orbsvcs/Naming_Service
parent0f3847bc7fd735ab88276fee59e2ebd6cb8d1f99 (diff)
downloadATCD-c979767a00db4ea1299af482033a68829cc16675.tar.gz
ChangeLogTag: Thu Jan 25 17:39:59 UTC 2007 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'TAO/orbsvcs/Naming_Service')
-rw-r--r--TAO/orbsvcs/Naming_Service/NT_Naming_Service.cpp17
-rw-r--r--TAO/orbsvcs/Naming_Service/Naming_Server.cpp8
-rw-r--r--TAO/orbsvcs/Naming_Service/Naming_Service.cpp22
3 files changed, 18 insertions, 29 deletions
diff --git a/TAO/orbsvcs/Naming_Service/NT_Naming_Service.cpp b/TAO/orbsvcs/Naming_Service/NT_Naming_Service.cpp
index b6b7dc75e91..2c1a9364ed6 100644
--- a/TAO/orbsvcs/Naming_Service/NT_Naming_Service.cpp
+++ b/TAO/orbsvcs/Naming_Service/NT_Naming_Service.cpp
@@ -64,18 +64,16 @@ TAO_NT_Naming_Service::handle_control (DWORD control_code)
// 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);
+ 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
{
@@ -167,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
@@ -180,14 +177,12 @@ TAO_NT_Naming_Service::svc (void)
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_DEBUG ((LM_INFO, "Exiting gracefully\n"));
return 0;
diff --git a/TAO/orbsvcs/Naming_Service/Naming_Server.cpp b/TAO/orbsvcs/Naming_Service/Naming_Server.cpp
index 9d450fb754d..0bfcc78a1fc 100644
--- a/TAO/orbsvcs/Naming_Service/Naming_Server.cpp
+++ b/TAO/orbsvcs/Naming_Service/Naming_Server.cpp
@@ -49,17 +49,15 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[])
ACE_TEXT("Failed to start the Naming Service.\n")),
1);
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
+ try
{
naming_service.run ();
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "NamingService");
+ ex._tao_print_exception ("NamingService");
return 1;
}
- ACE_ENDTRY;
naming_service.fini ();
diff --git a/TAO/orbsvcs/Naming_Service/Naming_Service.cpp b/TAO/orbsvcs/Naming_Service/Naming_Service.cpp
index e7a804a592b..cee5062bfff 100644
--- a/TAO/orbsvcs/Naming_Service/Naming_Service.cpp
+++ b/TAO/orbsvcs/Naming_Service/Naming_Service.cpp
@@ -30,15 +30,14 @@ TAO_Naming_Service::init (int argc,
{
int result;
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
+ try
{
// Copy command line parameter.
ACE_Argv_Type_Converter command_line(argc, argv);
// Initialize the ORB
this->orb_ =
- CORBA::ORB_init (command_line.get_argc(), command_line.get_ASCII_argv(), 0 ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (command_line.get_argc(), command_line.get_ASCII_argv(), 0);
// Parse the args for '-t' option. If '-t' option is passed, do
// the needful and then remove the option from the list of
@@ -54,12 +53,11 @@ TAO_Naming_Service::init (int argc,
if (result == -1)
return result;
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "TAO_Naming_Service::init");
+ ex._tao_print_exception ("TAO_Naming_Service::init");
return -1;
}
- ACE_ENDTRY;
return 0;
}
@@ -112,7 +110,7 @@ TAO_Naming_Service::run (void)
else
{
ACE_Time_Value tv (time_);
- this->orb_->run (tv ACE_ENV_ARG_PARAMETER);
+ this->orb_->run (tv);
}
return 0;
@@ -121,27 +119,25 @@ TAO_Naming_Service::run (void)
void
TAO_Naming_Service::shutdown (void)
{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
+ this->orb_->shutdown (0);
}
int
TAO_Naming_Service::fini (void)
{
- ACE_DECLARE_NEW_CORBA_ENV;
this->my_naming_server_.fini();
- ACE_TRY
+ try
{
// destroy implies shutdown
this->orb_->destroy ();
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "TAO_Naming_Service::fini");
+ ex._tao_print_exception ("TAO_Naming_Service::fini");
return -1;
}
- ACE_ENDTRY;
return 0;
}