diff options
Diffstat (limited to 'TAO/tests/ORB_shutdown/server.cpp')
-rw-r--r-- | TAO/tests/ORB_shutdown/server.cpp | 39 |
1 files changed, 13 insertions, 26 deletions
diff --git a/TAO/tests/ORB_shutdown/server.cpp b/TAO/tests/ORB_shutdown/server.cpp index 1ab5469ae50..69b521e5e28 100644 --- a/TAO/tests/ORB_shutdown/server.cpp +++ b/TAO/tests/ORB_shutdown/server.cpp @@ -11,19 +11,16 @@ ACE_RCSID (Hello, int main (int argc, char *argv[]) { - ACE_TRY_NEW_ENV + try { CORBA::ORB_var orb = - CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + CORBA::ORB_init (argc, argv, ""); CORBA::Object_var poa_object = - orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + orb->resolve_initial_references("RootPOA"); PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + PortableServer::POA::_narrow (poa_object.in ()); if (CORBA::is_nil (root_poa.in ())) ACE_ERROR_RETURN ((LM_ERROR, @@ -31,8 +28,7 @@ main (int argc, char *argv[]) 1); PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + root_poa->the_POAManager (); Foo_Bar *foobar_impl; ACE_NEW_RETURN (foobar_impl, @@ -40,11 +36,9 @@ main (int argc, char *argv[]) 1); Test::Foo_var foo = - foobar_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + foobar_impl->_this (); - poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + poa_manager->activate (); // Dont unscope it or move it elsewhere.. It is here with a // purpose. If you dont understand this, please re-read the @@ -57,33 +51,26 @@ main (int argc, char *argv[]) 0); // Just run the ORB for a minute.. - orb->run (tv ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + orb->run (tv); ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - shutting down the ORB\n")); - orb->shutdown (1 - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + orb->shutdown (1); ACE_DEBUG ((LM_DEBUG, "(%P|%t) Finished shutting down the ORB\n")); - root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + root_poa->destroy (1, 1); - orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + orb->destroy (); } - ACE_CATCHANY + catch (const CORBA::Exception& ex) { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Exception caught:"); + ex._tao_print_exception ("Exception caught:"); return 1; } - ACE_ENDTRY; ACE_DEBUG ((LM_DEBUG, "(%P|%t) Test successful.. \n")); |