diff options
Diffstat (limited to 'TAO/examples/POA/NewPOA/NewPOA.cpp')
-rw-r--r-- | TAO/examples/POA/NewPOA/NewPOA.cpp | 35 |
1 files changed, 8 insertions, 27 deletions
diff --git a/TAO/examples/POA/NewPOA/NewPOA.cpp b/TAO/examples/POA/NewPOA/NewPOA.cpp index be4283821ee..e2617cb42f0 100644 --- a/TAO/examples/POA/NewPOA/NewPOA.cpp +++ b/TAO/examples/POA/NewPOA/NewPOA.cpp @@ -37,12 +37,10 @@ print_poa (PortableServer::POA_ptr poa ACE_ENV_ARG_DECL) { CORBA::String_var poa_name = - poa->the_name (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + poa->the_name (); CORBA::OctetSeq_var poa_id = - poa->id (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + poa->id (); ACE_DEBUG ((LM_DEBUG, "POA name = %s\n", @@ -64,8 +62,7 @@ print_poa (PortableServer::POA_ptr poa "\n")); PortableServer::POAList_var children = - poa->the_children (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + poa->the_children (); for (CORBA::ULong index = 0; index != children->length (); @@ -73,7 +70,6 @@ print_poa (PortableServer::POA_ptr poa { print_poa (children[index] ACE_ENV_ARG_PARAMETER); - ACE_CHECK; } } @@ -89,18 +85,15 @@ main (int argc, char **argv) argv, 0 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Obtain the RootPOA. CORBA::Object_var obj = orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // _narrow() the Object to get the POA object, i.e., the root_poa. PortableServer::POA_var root_poa = PortableServer::POA::_narrow (obj.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Policies for the new POAs CORBA::PolicyList policies (2); @@ -109,12 +102,10 @@ main (int argc, char **argv) // Threading policy policies[0] = root_poa->create_thread_policy (PortableServer::ORB_CTRL_MODEL ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Lifespan policy policies[1] = root_poa->create_lifespan_policy (PortableServer::TRANSIENT ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Creation of the firstPOA ACE_CString name = "firstPOA"; @@ -123,7 +114,6 @@ main (int argc, char **argv) PortableServer::POAManager::_nil (), policies ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Creation of the new POA, i.e. firstPOA/secondPOA name = "secondPOA"; @@ -132,7 +122,6 @@ main (int argc, char **argv) PortableServer::POAManager::_nil (), policies ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Creating thirdPOA. name = "thirdPOA"; @@ -142,7 +131,6 @@ main (int argc, char **argv) PortableServer::POAManager::_nil (), policies ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Creation of the new POAs over, so destroy the Policy_ptr's. for (CORBA::ULong i = 0; @@ -150,27 +138,22 @@ main (int argc, char **argv) ++i) { CORBA::Policy_ptr policy = policies[i]; - policy->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + policy->destroy (); } // Get the names of all the POAs and print them out. CORBA::String_var root_poa_name = - root_poa->the_name (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + root_poa->the_name (); CORBA::String_var first_poa_name = - first_poa->the_name (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + first_poa->the_name (); CORBA::String_var second_poa_name = - second_poa->the_name (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + second_poa->the_name (); CORBA::String_var third_poa_name = - third_poa->the_name (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + third_poa->the_name (); ACE_DEBUG ((LM_DEBUG, "%s\n%s\n%s\n%s\n", @@ -181,7 +164,6 @@ main (int argc, char **argv) print_poa (root_poa.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; } ACE_CATCHANY @@ -190,7 +172,6 @@ main (int argc, char **argv) return -1; } ACE_ENDTRY; - ACE_CHECK_RETURN (-1); return 0; } |