diff options
Diffstat (limited to 'TAO/tests/ORT/server.cpp')
-rw-r--r-- | TAO/tests/ORT/server.cpp | 65 |
1 files changed, 18 insertions, 47 deletions
diff --git a/TAO/tests/ORT/server.cpp b/TAO/tests/ORT/server.cpp index d8656cc7c94..53c1aa8df89 100644 --- a/TAO/tests/ORT/server.cpp +++ b/TAO/tests/ORT/server.cpp @@ -41,8 +41,7 @@ parse_args (int argc, char *argv[]) int main (int argc, char *argv[]) { - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY + try { PortableInterceptor::ORBInitializer_ptr tmp; @@ -52,30 +51,22 @@ int main (int argc, char *argv[]) PortableInterceptor::ORBInitializer_var orb_initializer = tmp; - PortableInterceptor::register_orb_initializer (orb_initializer.in () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + PortableInterceptor::register_orb_initializer (orb_initializer.in ()); // Initialize the ORB. CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, - "ORT Test ORB" - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + "ORT Test ORB"); if (parse_args (argc, argv) != 0) return -1; CORBA::Object_var obj = - orb->resolve_initial_references ("RootPOA" - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + orb->resolve_initial_references ("RootPOA"); // Narrow PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (obj.in () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + PortableServer::POA::_narrow (obj.in ()); // Check for nil references if (CORBA::is_nil (root_poa.in ())) @@ -85,12 +76,10 @@ int main (int argc, char *argv[]) // Get poa_manager reference PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + root_poa->the_POAManager (); // Activate it. - poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + poa_manager->activate (); CORBA::PolicyList policies (0); policies.length (0); @@ -99,47 +88,33 @@ int main (int argc, char *argv[]) PortableServer::POA_var first_poa = root_poa->create_POA ("FIRST_POA", poa_manager.in (), - policies - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + policies); PortableServer::POA_var second_poa = first_poa->create_POA ("SECOND_POA", poa_manager.in (), - policies - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + policies); PortableServer::POA_var third_poa = second_poa->create_POA ("THIRD_POA", poa_manager.in (), - policies - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + policies); PortableServer::POA_var fourth_poa = third_poa->create_POA ("FOURTH_POA", poa_manager.in (), - policies - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + policies); ORT_test_i ort_test_impl (orb.in ()); PortableServer::ObjectId_var oid = - fourth_poa->activate_object (&ort_test_impl - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + fourth_poa->activate_object (&ort_test_impl); - obj = fourth_poa->servant_to_reference (&ort_test_impl - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + obj = fourth_poa->servant_to_reference (&ort_test_impl); // Convert the object reference to a string format. CORBA::String_var ior = - orb->object_to_string (obj.in () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + orb->object_to_string (obj.in ()); // Dump it to a file. if (ior_output_file != 0) @@ -155,19 +130,15 @@ int main (int argc, char *argv[]) ACE_OS::fclose (output_file); } - orb->run (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + orb->run (); - 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, - "ORT test server:"); + ex._tao_print_exception ("ORT test server:"); return -1; } - ACE_ENDTRY; return 0; } |