diff options
Diffstat (limited to 'TAO/tao/PortableServer/ORB_Manager.cpp')
-rw-r--r-- | TAO/tao/PortableServer/ORB_Manager.cpp | 161 |
1 files changed, 74 insertions, 87 deletions
diff --git a/TAO/tao/PortableServer/ORB_Manager.cpp b/TAO/tao/PortableServer/ORB_Manager.cpp index 8c1dcbad4a2..752ac45da94 100644 --- a/TAO/tao/PortableServer/ORB_Manager.cpp +++ b/TAO/tao/PortableServer/ORB_Manager.cpp @@ -27,27 +27,27 @@ TAO_ORB_Manager::TAO_ORB_Manager (CORBA::ORB_ptr orb, int TAO_ORB_Manager::init (int &argc, - char **argv, - CORBA::Environment &ACE_TRY_ENV) + char **argv + TAO_ENV_ARG_DECL) { return this->init (argc, argv, - 0, - ACE_TRY_ENV); + 0 + TAO_ENV_ARG_PARAMETER); } int TAO_ORB_Manager::init (int &argc, char **argv, - const char *orb_name, - CORBA::Environment &ACE_TRY_ENV) + const char *orb_name + TAO_ENV_ARG_DECL) { if (CORBA::is_nil (this->orb_.in ())) { this->orb_ = CORBA::ORB_init (argc, argv, - orb_name, - ACE_TRY_ENV); + orb_name + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); } @@ -55,8 +55,8 @@ TAO_ORB_Manager::init (int &argc, { // Get the POA from the ORB. CORBA::Object_var poa_object = - this->orb_->resolve_initial_references (TAO_OBJID_ROOTPOA, - ACE_TRY_ENV); + this->orb_->resolve_initial_references (TAO_OBJID_ROOTPOA + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); if (CORBA::is_nil (poa_object.in ())) @@ -66,8 +66,8 @@ TAO_ORB_Manager::init (int &argc, // Get the POA object. this->poa_ = - PortableServer::POA::_narrow (poa_object.in (), - ACE_TRY_ENV); + PortableServer::POA::_narrow (poa_object.in () + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); } @@ -76,7 +76,7 @@ TAO_ORB_Manager::init (int &argc, { // Get the POA_Manager. this->poa_manager_ = - this->poa_->the_POAManager (ACE_TRY_ENV); + this->poa_->the_POAManager (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); } @@ -87,30 +87,30 @@ TAO_ORB_Manager::init (int &argc, int TAO_ORB_Manager::init_child_poa (int& argc, char **argv, - const char *poa_name, - CORBA_Environment &ACE_TRY_ENV) + const char *poa_name + TAO_ENV_ARG_DECL) { return this->init_child_poa (argc, argv, poa_name, - 0, - ACE_TRY_ENV); + 0 + TAO_ENV_ARG_PARAMETER); } int TAO_ORB_Manager::init_child_poa (int& argc, char **argv, const char *poa_name, - const char *orb_name, - CORBA_Environment &ACE_TRY_ENV) + const char *orb_name + TAO_ENV_ARG_DECL) { int init_result; // check to see if root poa has to be created. init_result = this->init (argc, argv, - orb_name, - ACE_TRY_ENV); + orb_name + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); if (init_result == -1) @@ -125,14 +125,14 @@ TAO_ORB_Manager::init_child_poa (int& argc, // Id Assignment policy policies[0] = - this->poa_->create_id_assignment_policy (PortableServer::USER_ID, - ACE_TRY_ENV); + this->poa_->create_id_assignment_policy (PortableServer::USER_ID + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); // Lifespan policy policies[1] = - this->poa_->create_lifespan_policy (PortableServer::PERSISTENT, - ACE_TRY_ENV); + this->poa_->create_lifespan_policy (PortableServer::PERSISTENT + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); // We use a different POA, otherwise the user would have to change @@ -141,8 +141,8 @@ TAO_ORB_Manager::init_child_poa (int& argc, this->child_poa_ = this->poa_->create_POA (poa_name, this->poa_manager_.in (), - policies, - ACE_TRY_ENV); + policies + TAO_ENV_ARG_PARAMETER); // Warning! If create_POA fails, then the policies won't be // destroyed and there will be hell to pay in memory leaks! ACE_CHECK_RETURN (-1); @@ -153,7 +153,7 @@ TAO_ORB_Manager::init_child_poa (int& argc, ++i) { CORBA::Policy_ptr policy = policies[i]; - policy->destroy (ACE_TRY_ENV); + policy->destroy (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); } return 0; @@ -162,9 +162,9 @@ TAO_ORB_Manager::init_child_poa (int& argc, // Activate POA manager. int -TAO_ORB_Manager::activate_poa_manager (CORBA_Environment &ACE_TRY_ENV) +TAO_ORB_Manager::activate_poa_manager (TAO_ENV_SINGLE_ARG_DECL) { - this->poa_manager_->activate (ACE_TRY_ENV); + this->poa_manager_->activate (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); return 0; } @@ -172,51 +172,51 @@ TAO_ORB_Manager::activate_poa_manager (CORBA_Environment &ACE_TRY_ENV) // Activate servant in the POA. char * -TAO_ORB_Manager::activate (PortableServer::Servant servant, - CORBA_Environment &ACE_TRY_ENV) +TAO_ORB_Manager::activate (PortableServer::Servant servant + TAO_ENV_ARG_DECL) { PortableServer::ObjectId_var id = - this->poa_->activate_object (servant, - ACE_TRY_ENV); + this->poa_->activate_object (servant + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (0); CORBA::Object_var obj = - this->poa_->id_to_reference (id.in (), - ACE_TRY_ENV); + this->poa_->id_to_reference (id.in () + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (0); CORBA::String_var str = - this->orb_->object_to_string (obj.in (), - ACE_TRY_ENV); + this->orb_->object_to_string (obj.in () + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (0); return str._retn (); } void -TAO_ORB_Manager::deactivate (const char *id, - CORBA_Environment &ACE_TRY_ENV) +TAO_ORB_Manager::deactivate (const char *id + TAO_ENV_ARG_DECL) { CORBA::Object_var object = - this->orb_->string_to_object (id, - ACE_TRY_ENV); + this->orb_->string_to_object (id + TAO_ENV_ARG_PARAMETER); ACE_CHECK; PortableServer::ObjectId_var object_id = - this->poa_->reference_to_id (object.in (), - ACE_TRY_ENV); + this->poa_->reference_to_id (object.in () + TAO_ENV_ARG_PARAMETER); ACE_CHECK; - this->poa_->deactivate_object (object_id.in (), - ACE_TRY_ENV); + this->poa_->deactivate_object (object_id.in () + TAO_ENV_ARG_PARAMETER); } // Activate the object with the object_name under the child POA. char * TAO_ORB_Manager::activate_under_child_poa (const char *object_name, - PortableServer::Servant servant, - CORBA_Environment& ACE_TRY_ENV) + PortableServer::Servant servant + TAO_ENV_ARG_DECL) { if (object_name == 0) ACE_ERROR_RETURN ((LM_ERROR, @@ -228,18 +228,18 @@ TAO_ORB_Manager::activate_under_child_poa (const char *object_name, PortableServer::string_to_ObjectId (object_name); this->child_poa_->activate_object_with_id (id.in (), - servant, - ACE_TRY_ENV); + servant + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (0); CORBA::Object_var obj = - this->child_poa_->id_to_reference (id.in (), - ACE_TRY_ENV); + this->child_poa_->id_to_reference (id.in () + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (0); char * str = - this->orb_->object_to_string (obj.in (), - ACE_TRY_ENV); + this->orb_->object_to_string (obj.in () + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (0); @@ -247,60 +247,47 @@ TAO_ORB_Manager::activate_under_child_poa (const char *object_name, } void -TAO_ORB_Manager::deactivate_under_child_poa (const char *id, - CORBA_Environment &ACE_TRY_ENV) +TAO_ORB_Manager::deactivate_under_child_poa (const char *id + TAO_ENV_ARG_DECL) { CORBA::Object_var object = - this->orb_->string_to_object (id, - ACE_TRY_ENV); + this->orb_->string_to_object (id + TAO_ENV_ARG_PARAMETER); ACE_CHECK; PortableServer::ObjectId_var object_id = - this->child_poa_->reference_to_id (object.in (), - ACE_TRY_ENV); + this->child_poa_->reference_to_id (object.in () + TAO_ENV_ARG_PARAMETER); ACE_CHECK; - this->child_poa_->deactivate_object (object_id.in (), - ACE_TRY_ENV); + this->child_poa_->deactivate_object (object_id.in () + TAO_ENV_ARG_PARAMETER); } // Enter the ORB event loop. int -TAO_ORB_Manager::run (CORBA_Environment &ACE_TRY_ENV, - ACE_Time_Value *tv) -{ - this->poa_manager_->activate (ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - - this->orb_->run (tv, ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - - return 0; -} - -int -TAO_ORB_Manager::run (ACE_Time_Value &tv, - CORBA_Environment &ACE_TRY_ENV) +TAO_ORB_Manager::run (ACE_Time_Value &tv + TAO_ENV_ARG_DECL) { - this->poa_manager_->activate (ACE_TRY_ENV); + this->poa_manager_->activate (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); - this->orb_->run (tv, ACE_TRY_ENV); + this->orb_->run (tv TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); return 0; } int -TAO_ORB_Manager::fini (CORBA_Environment &ACE_TRY_ENV) +TAO_ORB_Manager::fini (TAO_ENV_SINGLE_ARG_DECL) { - this->poa_->destroy (1, 1, ACE_TRY_ENV); + this->poa_->destroy (1, 1 TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); this->poa_ = 0; - this->orb_->destroy (ACE_TRY_ENV); + this->orb_->destroy (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); this->orb_ = 0; @@ -308,12 +295,12 @@ TAO_ORB_Manager::fini (CORBA_Environment &ACE_TRY_ENV) } int -TAO_ORB_Manager::run (CORBA_Environment &ACE_TRY_ENV) +TAO_ORB_Manager::run (TAO_ENV_SINGLE_ARG_DECL) { - this->poa_manager_->activate (ACE_TRY_ENV); + this->poa_manager_->activate (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); - this->orb_->run (ACE_TRY_ENV); + this->orb_->run (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); return 0; @@ -356,8 +343,8 @@ TAO_ORB_Manager::~TAO_ORB_Manager (void) if (!CORBA::is_nil (this->poa_.in ())) { this->poa_->destroy (1, - 1, - ACE_TRY_ENV); + 1 + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; } } |