From 528474110ea3692de384e7d5e906b8e021eae7ad Mon Sep 17 00:00:00 2001 From: elliott_c Date: Thu, 25 Jan 2007 18:17:52 +0000 Subject: ChangeLogTag: Thu Jan 25 17:39:59 UTC 2007 Chad Elliott --- TAO/tests/BiDirectional/server.cpp | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) (limited to 'TAO/tests/BiDirectional/server.cpp') diff --git a/TAO/tests/BiDirectional/server.cpp b/TAO/tests/BiDirectional/server.cpp index d1ecad1ccc6..0b8c678b717 100644 --- a/TAO/tests/BiDirectional/server.cpp +++ b/TAO/tests/BiDirectional/server.cpp @@ -43,13 +43,13 @@ parse_args (int argc, char *argv[]) int main (int argc, char *argv[]) { - ACE_TRY_NEW_ENV + try { CORBA::ORB_var orb = - CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER); + CORBA::ORB_init (argc, argv, ""); CORBA::Object_var poa_object = - orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER); + orb->resolve_initial_references ("RootPOA"); if (CORBA::is_nil (poa_object.in ())) ACE_ERROR_RETURN ((LM_ERROR, @@ -57,7 +57,7 @@ main (int argc, char *argv[]) 1); PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER); + PortableServer::POA::_narrow (poa_object.in ()); PortableServer::POAManager_var poa_manager = root_poa->the_POAManager (); @@ -70,8 +70,7 @@ main (int argc, char *argv[]) pol <<= BiDirPolicy::BOTH; policies[0] = orb->create_policy (BiDirPolicy::BIDIRECTIONAL_POLICY_TYPE, - pol - ACE_ENV_ARG_PARAMETER); + pol); // Create POA as child of RootPOA with the above policies. This POA // will receive request in the same connection in which it sent @@ -79,8 +78,7 @@ main (int argc, char *argv[]) PortableServer::POA_var child_poa = root_poa->create_POA ("childPOA", poa_manager.in (), - policies - ACE_ENV_ARG_PARAMETER); + policies); // Creation of childPOA is over. Destroy the Policy objects. for (CORBA::ULong i = 0; @@ -102,15 +100,13 @@ main (int argc, char *argv[]) PortableServer::string_to_ObjectId ("simple_server"); child_poa->activate_object_with_id (id.in (), - &server_impl - ACE_ENV_ARG_PARAMETER); + &server_impl); CORBA::Object_var obj = - child_poa->id_to_reference (id.in () - ACE_ENV_ARG_PARAMETER); + child_poa->id_to_reference (id.in ()); CORBA::String_var ior = - orb->object_to_string (obj.in () ACE_ENV_ARG_PARAMETER); + orb->object_to_string (obj.in ()); ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ())); @@ -146,15 +142,13 @@ main (int argc, char *argv[]) } ACE_DEBUG ((LM_DEBUG, "event loop finished\n")); - root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER); + root_poa->destroy (1, 1); } - ACE_CATCHANY + catch (const CORBA::Exception& ex) { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Caught exception:"); + ex._tao_print_exception ("Caught exception:"); return 1; } - ACE_ENDTRY; return 0; } -- cgit v1.2.1