diff options
Diffstat (limited to 'TAO/examples/POA/On_Demand_Loading/Server_Manager.cpp')
-rw-r--r-- | TAO/examples/POA/On_Demand_Loading/Server_Manager.cpp | 88 |
1 files changed, 44 insertions, 44 deletions
diff --git a/TAO/examples/POA/On_Demand_Loading/Server_Manager.cpp b/TAO/examples/POA/On_Demand_Loading/Server_Manager.cpp index 00294c8a752..41538165583 100644 --- a/TAO/examples/POA/On_Demand_Loading/Server_Manager.cpp +++ b/TAO/examples/POA/On_Demand_Loading/Server_Manager.cpp @@ -112,15 +112,15 @@ Server_i::write_iors_to_file (const char *first_ior, int Server_i::init (int argc, char **argv) { - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { // Initialize the ORB. orb_ = CORBA::ORB_init (argc, argv, - 0, - ACE_TRY_ENV); + 0 + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; int result = parse_args (argc, argv); @@ -129,17 +129,17 @@ Server_i::init (int argc, char **argv) // Obtain the RootPOA. CORBA::Object_var obj = - orb_->resolve_initial_references ("RootPOA", - ACE_TRY_ENV); + orb_->resolve_initial_references ("RootPOA" + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Narrow the Object reference to a POA reference - root_poa_ = PortableServer::POA::_narrow (obj.in (), - ACE_TRY_ENV); + root_poa_ = PortableServer::POA::_narrow (obj.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Get the POAManager of RootPOA - poa_manager_ = root_poa_->the_POAManager (ACE_TRY_ENV); + poa_manager_ = root_poa_->the_POAManager (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; } @@ -163,7 +163,7 @@ Server_i::create_poa (const char *name, { PortableServer::POA_ptr my_poa = 0; - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { policies_.length (4); @@ -171,37 +171,37 @@ Server_i::create_poa (const char *name, // ID Assignment Policy. policies_[0] = root_poa_->create_id_assignment_policy - (PortableServer::USER_ID, - ACE_TRY_ENV); + (PortableServer::USER_ID + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Lifespan Policy. policies_[1] = root_poa_->create_lifespan_policy - (PortableServer::PERSISTENT, - ACE_TRY_ENV); + (PortableServer::PERSISTENT + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Request Processing Policy. policies_[2] = root_poa_->create_request_processing_policy - (PortableServer::USE_SERVANT_MANAGER, - ACE_TRY_ENV); + (PortableServer::USE_SERVANT_MANAGER + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Servant Retention Policy. if (servant_retention_policy == 1) policies_[3] = root_poa_->create_servant_retention_policy - (PortableServer::RETAIN, - ACE_TRY_ENV); + (PortableServer::RETAIN + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; if (servant_retention_policy == 0) policies_[3] = root_poa_->create_servant_retention_policy - (PortableServer::NON_RETAIN, - ACE_TRY_ENV); + (PortableServer::NON_RETAIN + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Create myPOA as the child of RootPOA with the above @@ -210,8 +210,8 @@ Server_i::create_poa (const char *name, // being RETAIN or NONRETAIN respectively. my_poa = root_poa_->create_POA (name, poa_manager_.in (), - policies_, - ACE_TRY_ENV); + policies_ + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Destroy the policy objects as they have been passed to @@ -221,7 +221,7 @@ Server_i::create_poa (const char *name, ++i) { CORBA::Policy_ptr policy = policies_[i]; - policy->destroy (ACE_TRY_ENV); + policy->destroy (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; } } @@ -241,7 +241,7 @@ Server_i::create_poa (const char *name, int Server_i::create_activator (PortableServer::POA_var first_poa) { - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { // An Servant Activator object is created which will activate @@ -252,17 +252,17 @@ Server_i::create_activator (PortableServer::POA_var first_poa) // Set ServantActivator_i object as the servant_manager of // firstPOA. - first_poa->set_servant_manager (servant_activator_impl_, - ACE_TRY_ENV); + first_poa->set_servant_manager (servant_activator_impl_ + TAO_ENV_ARG_PARAMETER); // For the code above, we're using the CORBA 3.0 servant manager // semantics supported by TAO. For CORBA 2.x ORBs you'd need to // use the following code in place of the previous line: // - // PortableServer::ServantManager_var servant_activator = + // PortableServer::ServantManager_var servant_activator = // servant_activator_impl_->_this (); // // first_poa->set_servant_manager (servant_activator.in (), - // ACE_TRY_ENV); + // TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; // Create a reference with user created ID in firstPOA which @@ -275,8 +275,8 @@ Server_i::create_activator (PortableServer::POA_var first_poa) "create_MyFoo"); first_foo_ = first_poa->create_reference_with_id (first_foo_oid.in (), - "IDL:Foo:1.0", - ACE_TRY_ENV); + "IDL:Foo:1.0" + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY @@ -294,7 +294,7 @@ Server_i::create_activator (PortableServer::POA_var first_poa) int Server_i::create_locator (PortableServer::POA_var second_poa) { - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { // An Servant Locator object is created which will activate @@ -305,16 +305,16 @@ Server_i::create_locator (PortableServer::POA_var second_poa) // Set ServantLocator_i object as the servant Manager of // secondPOA. - second_poa->set_servant_manager (servant_locator_impl_, - ACE_TRY_ENV); + second_poa->set_servant_manager (servant_locator_impl_ + TAO_ENV_ARG_PARAMETER); // For the code above, we're using the CORBA 3.0 servant manager // semantics supported by TAO. For CORBA 2.x ORBs you'd need to // use the following code in place of the previous line: // PortableServer::ServantManager_var servant_loactor = // servant_loator_impl_->_this (); - // + // // second_poa->set_servant_manager (servant_locator_impl_, - // ACE_TRY_ENV); + // TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; // Try to create a reference with user created ID in second_poa @@ -327,8 +327,8 @@ Server_i::create_locator (PortableServer::POA_var second_poa) "create_MyFoo"); second_foo_ = second_poa->create_reference_with_id (second_foo_oid.in (), - "IDL:Foo:1.0", - ACE_TRY_ENV); + "IDL:Foo:1.0" + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY @@ -346,20 +346,20 @@ Server_i::create_locator (PortableServer::POA_var second_poa) int Server_i::run (void) { - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { // Invoke object_to_string on the references created in firstPOA // and secondPOA. CORBA::String_var first_foo_ior = - orb_->object_to_string (first_foo_.in (), - ACE_TRY_ENV); + orb_->object_to_string (first_foo_.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; CORBA::String_var second_foo_ior = - orb_->object_to_string (second_foo_.in (), - ACE_TRY_ENV); + orb_->object_to_string (second_foo_.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Print the ior's of first_foo and second_foo. @@ -376,15 +376,15 @@ Server_i::run (void) // Set the poa_manager state to active, ready to process // requests. - poa_manager_->activate (ACE_TRY_ENV); + poa_manager_->activate (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; // Run the ORB. - orb_->run (ACE_TRY_ENV); + orb_->run (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - orb_->destroy (ACE_TRY_ENV); + orb_->destroy (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY |