diff options
author | elliott_c <elliott_c@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2007-01-25 18:04:11 +0000 |
---|---|---|
committer | elliott_c <elliott_c@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2007-01-25 18:04:11 +0000 |
commit | c979767a00db4ea1299af482033a68829cc16675 (patch) | |
tree | 3e959cad0a053f1adad663e7c02bc7a239f383d8 /TAO/orbsvcs/examples/PSS/Simple_Naming.cpp | |
parent | 0f3847bc7fd735ab88276fee59e2ebd6cb8d1f99 (diff) | |
download | ATCD-c979767a00db4ea1299af482033a68829cc16675.tar.gz |
ChangeLogTag: Thu Jan 25 17:39:59 UTC 2007 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'TAO/orbsvcs/examples/PSS/Simple_Naming.cpp')
-rw-r--r-- | TAO/orbsvcs/examples/PSS/Simple_Naming.cpp | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/TAO/orbsvcs/examples/PSS/Simple_Naming.cpp b/TAO/orbsvcs/examples/PSS/Simple_Naming.cpp index 73677dbb51a..5c61b3bfc7f 100644 --- a/TAO/orbsvcs/examples/PSS/Simple_Naming.cpp +++ b/TAO/orbsvcs/examples/PSS/Simple_Naming.cpp @@ -54,26 +54,24 @@ parse_args (int argc, char *argv[]) int main (int argc, char *argv[]) { - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY + try { // Initialize the ORB. CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, - "" - ACE_ENV_ARG_PARAMETER); + ""); if (parse_args (argc, argv) == -1) return -1; // Get a reference to the RootPOA CORBA::Object_var poa_object = - orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER); + orb->resolve_initial_references ("RootPOA"); // Narrow down to the correct reference PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER); + PortableServer::POA::_narrow (poa_object.in ()); // Set a POA Manager PortableServer::POAManager_var poa_manager = @@ -87,21 +85,18 @@ main (int argc, char *argv[]) // Id Assignment policy policies[0] = - root_poa->create_id_assignment_policy (PortableServer::USER_ID - ACE_ENV_ARG_PARAMETER); + root_poa->create_id_assignment_policy (PortableServer::USER_ID); // Lifespan policy policies[1] = - root_poa->create_lifespan_policy (PortableServer::PERSISTENT - ACE_ENV_ARG_PARAMETER); + root_poa->create_lifespan_policy (PortableServer::PERSISTENT); // We use a different POA, otherwise the user would have to change // the object key each time it invokes the server. PortableServer::POA_var poa = root_poa->create_POA ("Simple_Naming", poa_manager.in (), - policies - ACE_ENV_ARG_PARAMETER); + policies); // Creation of the new POAs over, so destroy the Policy_ptr's. for (CORBA::ULong i = 0; @@ -119,8 +114,7 @@ main (int argc, char *argv[]) simple_naming_i._this (); CORBA::String_var string_obj_ref = - orb->object_to_string (simple_naming.in () - ACE_ENV_ARG_PARAMETER); + orb->object_to_string (simple_naming.in ()); // Output the IOR to the <ior_output_file> FILE *output_file= ACE_OS::fopen (ior_output_file, "w"); @@ -134,17 +128,16 @@ main (int argc, char *argv[]) orb->run (); - poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER); + poa->destroy (1, 1); orb->destroy (); } - ACE_CATCHANY + catch (const CORBA::Exception& ex) { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, + ACE_PRINT_EXCEPTION (ex, "Unexpected excpeption in PSS Test"); return -1; } - ACE_ENDTRY; return 0; } |