diff options
Diffstat (limited to 'TAO/tests/Two_Objects/server.cpp')
-rw-r--r-- | TAO/tests/Two_Objects/server.cpp | 35 |
1 files changed, 12 insertions, 23 deletions
diff --git a/TAO/tests/Two_Objects/server.cpp b/TAO/tests/Two_Objects/server.cpp index 0e6d5a8e9f2..903166e80ad 100644 --- a/TAO/tests/Two_Objects/server.cpp +++ b/TAO/tests/Two_Objects/server.cpp @@ -57,22 +57,19 @@ parse_args (int argc, char *argv[]) int main (int argc, char *argv[]) { - ACE_TRY_NEW_ENV + try { // Initialize the ORB CORBA::ORB_var orb = - CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + CORBA::ORB_init (argc, argv, ""); // Get initial reference to the Root POA CORBA::Object_var poa_object = - orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + orb->resolve_initial_references("RootPOA"); // Narrow down to the appropriate type 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, @@ -81,8 +78,7 @@ main (int argc, char *argv[]) // Get referencee to the POA manager PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + root_poa->the_POAManager (); // Parse the arguments if (parse_args (argc, argv) != 0) @@ -101,14 +97,12 @@ main (int argc, char *argv[]) // _this method registers the object withe the POA and returns // an object reference Two_Objects_Test::Object_Factory_var factory = - factory_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + factory_impl->_this (); // Convert the object reference to a string so that it can // be saved in a file and used by clinet programs later CORBA::String_var ior = - orb->object_to_string (factory.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + orb->object_to_string (factory.in ()); // If the ior_output_file exists, output the ior to it FILE *output_file= ACE_OS::fopen (ior_output_file, "w"); @@ -123,8 +117,7 @@ main (int argc, char *argv[]) ACE_OS::fclose (output_file); // Activate the POA manager - poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + poa_manager->activate (); // Instantiate the specified # of worker threads Worker worker (orb.in (), orb_timeout); @@ -140,19 +133,15 @@ main (int argc, char *argv[]) ACE_DEBUG ((LM_DEBUG, "(%P|%t) event loop finished\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; return 0; } |