summaryrefslogtreecommitdiff
path: root/TAO/tao/PortableServer/Object_Adapter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/PortableServer/Object_Adapter.cpp')
-rw-r--r--TAO/tao/PortableServer/Object_Adapter.cpp94
1 files changed, 28 insertions, 66 deletions
diff --git a/TAO/tao/PortableServer/Object_Adapter.cpp b/TAO/tao/PortableServer/Object_Adapter.cpp
index 8c854b27170..08d88ae3bc8 100644
--- a/TAO/tao/PortableServer/Object_Adapter.cpp
+++ b/TAO/tao/PortableServer/Object_Adapter.cpp
@@ -470,9 +470,7 @@ TAO_Object_Adapter::activate_poa (const poa_name &folded_name,
try
{
- current = parent->find_POA_i (*iterator,
- 1
- );
+ current = parent->find_POA_i (*iterator, 1);
}
catch (const PortableServer::POA::AdapterNonExistent&)
{
@@ -524,12 +522,9 @@ TAO_Object_Adapter::bind_poa (const poa_name &folded_name,
poa_name_out system_name)
{
if (poa->persistent ())
- return this->bind_persistent_poa (folded_name,
- poa,
- system_name);
+ return this->bind_persistent_poa (folded_name, poa, system_name);
else
- return this->bind_transient_poa (poa,
- system_name);
+ return this->bind_transient_poa (poa, system_name);
}
int
@@ -538,31 +533,24 @@ TAO_Object_Adapter::unbind_poa (TAO_Root_POA *poa,
const poa_name &system_name)
{
if (poa->persistent ())
- return this->unbind_persistent_poa (folded_name,
- system_name);
+ return this->unbind_persistent_poa (folded_name, system_name);
else
return this->unbind_transient_poa (system_name);
}
int
-TAO_Object_Adapter::locate_servant_i (const TAO::ObjectKey &key
- )
+TAO_Object_Adapter::locate_servant_i (const TAO::ObjectKey &key)
{
ACE_FUNCTION_TIMEPROBE (TAO_POA_LOCATE_SERVANT_START);
PortableServer::ObjectId id;
TAO_Root_POA *poa = 0;
- this->locate_poa (key,
- id,
- poa
- );
+ this->locate_poa (key, id, poa);
PortableServer::Servant servant = 0;
TAO_SERVANT_LOCATION servant_location =
- poa->locate_servant_i (id,
- servant
- );
+ poa->locate_servant_i (id, servant);
switch (servant_location)
{
@@ -586,9 +574,7 @@ TAO_Object_Adapter::find_servant_i (const TAO::ObjectKey &key,
PortableServer::ObjectId id;
TAO_Root_POA *poa = 0;
- this->locate_poa (key,
- id,
- poa);
+ this->locate_poa (key, id, poa);
TAO_SERVANT_LOCATION servant_location = poa->locate_servant_i (id,
servant);
@@ -618,8 +604,7 @@ TAO_Object_Adapter::open (void)
::CORBA::PolicyList policy;
PortableServer::POAManager_var poa_manager
= poa_manager_factory_->create_POAManager (TAO_DEFAULT_ROOTPOAMANAGER_NAME,
- policy
- );
+ policy);
#else
PortableServer::POAManager_ptr poa_manager_ptr;
::CORBA::PolicyList policy_list;
@@ -655,8 +640,7 @@ TAO_Object_Adapter::open (void)
#endif /* TAO_HAS_MINIMUM_POA == 0 */
// Merge policies from the ORB level.
- this->validator ().merge_policies (policies.policies ()
- );
+ this->validator ().merge_policies (policies.policies ());
// If any of the policy objects specified are not valid for the ORB
// implementation, if conflicting policy objects are specified, or
@@ -664,9 +648,7 @@ TAO_Object_Adapter::open (void)
// administrative action that has not been performed, an
// InvalidPolicy exception is raised containing the index in the
// policies parameter value of the first offending policy object.
- policies.validate_policies (this->validator (),
- this->orb_core_
- );
+ policies.validate_policies (this->validator (), this->orb_core_);
// Construct a new POA
TAO_Root_POA::String root_poa_name (TAO_DEFAULT_ROOTPOA_NAME);
@@ -695,8 +677,7 @@ TAO_Object_Adapter::open (void)
}
void
-TAO_Object_Adapter::close (int wait_for_completion
- )
+TAO_Object_Adapter::close (int wait_for_completion)
{
this->check_close (wait_for_completion);
@@ -726,10 +707,8 @@ TAO_Object_Adapter::close (int wait_for_completion
this->poa_manager_factory_ = 0;
#endif
}
- CORBA::Boolean etherealize_objects = 1;
- root->destroy (etherealize_objects,
- wait_for_completion
- );
+ CORBA::Boolean etherealize_objects = true;
+ root->destroy (etherealize_objects, wait_for_completion);
::CORBA::release (root);
#if (TAO_HAS_MINIMUM_POA == 0) && !defined (CORBA_E_COMPACT) && !defined (CORBA_E_MICRO)
release_poa_manager_factory (factory);
@@ -737,12 +716,10 @@ TAO_Object_Adapter::close (int wait_for_completion
}
void
-TAO_Object_Adapter::check_close (int wait_for_completion
- )
+TAO_Object_Adapter::check_close (int wait_for_completion)
{
TAO_Root_POA::check_for_valid_wait_for_completions (this->orb_core (),
- wait_for_completion
- );
+ wait_for_completion);
}
int
@@ -754,8 +731,7 @@ TAO_Object_Adapter::priority (void) const
int
TAO_Object_Adapter::dispatch (TAO::ObjectKey &key,
TAO_ServerRequest &request,
- CORBA::Object_out forward_to
- )
+ CORBA::Object_out forward_to)
{
if (key.length() < TAO_Root_POA::TAO_OBJECTKEY_PREFIX_SIZE
|| ACE_OS::memcmp (key.get_buffer (),
@@ -983,11 +959,9 @@ TAO_Object_Adapter::get_collocated_servant (const TAO_MProfile &mp)
try
{
- this->find_servant (objkey.in (),
- servant
- );
+ this->find_servant (objkey.in (), servant);
}
- catch ( ::CORBA::Exception&)
+ catch (const ::CORBA::Exception&)
{
}
@@ -1021,8 +995,7 @@ TAO_Object_Adapter::Active_Hint_Strategy::~Active_Hint_Strategy (void)
int
TAO_Object_Adapter::Active_Hint_Strategy::find_persistent_poa (
const poa_name &system_name,
- TAO_Root_POA *&poa
- )
+ TAO_Root_POA *&poa)
{
poa_name folded_name;
int result = this->persistent_poa_system_map_.recover_key (system_name,
@@ -1030,8 +1003,7 @@ TAO_Object_Adapter::Active_Hint_Strategy::find_persistent_poa (
if (result == 0)
{
- result = this->persistent_poa_system_map_.find (system_name,
- poa);
+ result = this->persistent_poa_system_map_.find (system_name, poa);
if (result != 0
|| folded_name != poa->folded_name ())
{
@@ -1040,10 +1012,7 @@ TAO_Object_Adapter::Active_Hint_Strategy::find_persistent_poa (
poa);
if (result != 0)
{
- result =
- this->object_adapter_->activate_poa (folded_name,
- poa
- );
+ result = this->object_adapter_->activate_poa (folded_name, poa);
}
}
}
@@ -1099,8 +1068,7 @@ TAO_Object_Adapter::No_Hint_Strategy::~No_Hint_Strategy (void)
int
TAO_Object_Adapter::No_Hint_Strategy::find_persistent_poa (
const poa_name &system_name,
- TAO_Root_POA *&poa
- )
+ TAO_Root_POA *&poa)
{
int result =
this->object_adapter_->persistent_poa_name_map_->find (system_name,
@@ -1108,9 +1076,7 @@ TAO_Object_Adapter::No_Hint_Strategy::find_persistent_poa (
if (result != 0)
{
result =
- this->object_adapter_->activate_poa (system_name,
- poa
- );
+ this->object_adapter_->activate_poa (system_name, poa);
}
return result;
@@ -1123,8 +1089,7 @@ TAO_Object_Adapter::No_Hint_Strategy::bind_persistent_poa (
poa_name_out system_name)
{
int result =
- this->object_adapter_->persistent_poa_name_map_->bind (folded_name,
- poa);
+ this->object_adapter_->persistent_poa_name_map_->bind (folded_name, poa);
if (result == 0)
ACE_NEW_RETURN (system_name,
poa_name (folded_name),
@@ -1240,8 +1205,7 @@ TAO_Object_Adapter::wait_for_non_servant_upcalls_to_complete (void)
ACE_OS::thr_self ()))
{
// If so wait...
- int result =
- this->non_servant_upcall_condition_.wait ();
+ int const result = this->non_servant_upcall_condition_.wait ();
if (result == -1)
throw ::CORBA::OBJ_ADAPTER ();
}
@@ -1255,7 +1219,7 @@ TAO_Object_Adapter::wait_for_non_servant_upcalls_to_complete_no_throw (void)
{
this->wait_for_non_servant_upcalls_to_complete ();
}
- catch ( ::CORBA::Exception&)
+ catch (const ::CORBA::Exception&)
{
ACE_ERROR ((LM_ERROR,
"TAO_Object_Adapter::wait_for_non_servant_upcalls_to_complete "
@@ -1277,9 +1241,7 @@ TAO_Object_Adapter::do_dispatch (TAO_ServerRequest& req,
TAO::Portable_Server::Servant_Upcall& upcall
)
{
- upcall.servant ()->_dispatch(req,
- &upcall
- );
+ upcall.servant ()->_dispatch(req, &upcall);
}
TAO_END_VERSIONED_NAMESPACE_DECL