summaryrefslogtreecommitdiff
path: root/TAO/tao/PortableServer/RequestProcessingStrategyServantActivator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/PortableServer/RequestProcessingStrategyServantActivator.cpp')
-rw-r--r--TAO/tao/PortableServer/RequestProcessingStrategyServantActivator.cpp73
1 files changed, 22 insertions, 51 deletions
diff --git a/TAO/tao/PortableServer/RequestProcessingStrategyServantActivator.cpp b/TAO/tao/PortableServer/RequestProcessingStrategyServantActivator.cpp
index 7f1583967bf..2729e7c0cc6 100644
--- a/TAO/tao/PortableServer/RequestProcessingStrategyServantActivator.cpp
+++ b/TAO/tao/PortableServer/RequestProcessingStrategyServantActivator.cpp
@@ -23,40 +23,32 @@ namespace TAO
namespace Portable_Server
{
RequestProcessingStrategyServantActivator::RequestProcessingStrategyServantActivator (void) :
- etherealize_objects_ (1)
+ etherealize_objects_ (true)
{
}
void
- RequestProcessingStrategyServantActivator::strategy_cleanup (
- void)
+ RequestProcessingStrategyServantActivator::strategy_cleanup (void)
{
{
Non_Servant_Upcall non_servant_upcall (*this->poa_);
ACE_UNUSED_ARG (non_servant_upcall);
- this->servant_activator_ =
- PortableServer::ServantActivator::_nil ();
+ this->servant_activator_ = PortableServer::ServantActivator::_nil ();
}
RequestProcessingStrategy::strategy_cleanup ();
}
PortableServer::ServantManager_ptr
- RequestProcessingStrategyServantActivator::get_servant_manager (
- void)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableServer::POA::WrongPolicy))
+ RequestProcessingStrategyServantActivator::get_servant_manager (void)
{
return PortableServer::ServantManager::_duplicate (this->servant_activator_.in ());
}
void
RequestProcessingStrategyServantActivator::set_servant_manager (
- PortableServer::ServantManager_ptr imgr
- )
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableServer::POA::WrongPolicy))
+ PortableServer::ServantManager_ptr imgr)
{
// This operation sets the default servant manager associated with the
// POA. This operation may only be invoked once after a POA has been
@@ -69,24 +61,19 @@ namespace TAO
}
this->servant_activator_ =
- PortableServer::ServantActivator::_narrow (imgr
- );
+ PortableServer::ServantActivator::_narrow (imgr);
- this->validate_servant_manager (this->servant_activator_.in ()
- );
+ this->validate_servant_manager (this->servant_activator_.in ());
}
TAO_SERVANT_LOCATION
RequestProcessingStrategyServantActivator::locate_servant (
const PortableServer::ObjectId &system_id,
- PortableServer::Servant &servant
- )
+ PortableServer::Servant &servant)
{
TAO_SERVANT_LOCATION location = TAO_SERVANT_NOT_FOUND;
- location = this->poa_->servant_present (system_id,
- servant
- );
+ location = this->poa_->servant_present (system_id, servant);
if (location == TAO_SERVANT_NOT_FOUND)
{
@@ -112,8 +99,7 @@ namespace TAO
servant = this->poa_->find_servant (system_id,
servant_upcall,
- poa_current_impl
- );
+ poa_current_impl);
if (servant != 0)
{
@@ -139,12 +125,9 @@ namespace TAO
// reference.
//
- this->validate_servant_manager (this->servant_activator_.in ()
- );
+ this->validate_servant_manager (this->servant_activator_.in ());
- servant =
- this->incarnate_servant (poa_current_impl.object_id ()
- );
+ servant = this->incarnate_servant (poa_current_impl.object_id ());
// If the incarnate operation returns a servant that is
// already active for a different Object Id and if the POA
@@ -161,8 +144,7 @@ namespace TAO
// If we are not allowed to activate the servant, throw an exception
// etherealize is not called because the servant is never added to
// the active object map
- ACE_THROW_RETURN (CORBA::OBJ_ADAPTER (),
- 0);
+ throw ::CORBA::OBJ_ADAPTER ();
}
// The POA enters the returned Servant value into the Active
@@ -172,7 +154,7 @@ namespace TAO
// are no errors or if a restart is not required.
if (!wait_occurred_restart_call)
{
- int result =
+ int const result =
this->poa_->
rebind_using_user_id_and_system_id (servant,
poa_current_impl.object_id (),
@@ -182,8 +164,7 @@ namespace TAO
{
// Throw an exception, etherealize is not called because servant
// is not added to the active object map
- ACE_THROW_RETURN (CORBA::OBJ_ADAPTER (),
- 0);
+ throw ::CORBA::OBJ_ADAPTER ();
}
// Increment the reference count on the servant upcall.
@@ -194,8 +175,7 @@ namespace TAO
CORBA::Boolean cleanup_in_progress = 0;
this->etherealize_servant (poa_current_impl.object_id (),
servant,
- cleanup_in_progress
- );
+ cleanup_in_progress);
// We ended up waiting on a condition variable, the
// POA state may have changed while we are waiting.
@@ -228,14 +208,12 @@ namespace TAO
this->poa_,
servant,
cleanup_in_progress,
- remaining_activations
- );
+ remaining_activations);
}
PortableServer::Servant
RequestProcessingStrategyServantActivator::incarnate_servant (
- const PortableServer::ObjectId& object_id
- )
+ const PortableServer::ObjectId& object_id)
{
PortableServer::Servant servant = 0;
@@ -247,15 +225,11 @@ namespace TAO
// Invocations of incarnate on the servant manager are serialized.
// Invocations of etherealize on the servant manager are serialized.
// Invocations of incarnate and etherealize on the servant manager are mutually exclusive.
- servant = this->servant_activator_->incarnate (object_id,
- this->poa_
- );
+ servant = this->servant_activator_->incarnate (object_id, this->poa_);
if (servant == 0)
{
- ACE_THROW_RETURN (CORBA::OBJ_ADAPTER (CORBA::OMGVMCID | 7,
- CORBA::COMPLETED_NO),
- 0);
+ throw ::CORBA::OBJ_ADAPTER (CORBA::OMGVMCID | 7, CORBA::COMPLETED_NO);
}
else
{
@@ -301,8 +275,7 @@ namespace TAO
{
this->etherealize_servant (user_id,
servant,
- this->poa_->cleanup_in_progress ()
- );
+ this->poa_->cleanup_in_progress ());
}
else
{
@@ -317,9 +290,7 @@ namespace TAO
// This operation causes the association of the Object Id specified
// by the oid parameter and its servant to be removed from the
// Active Object Map.
- int result = this->poa_->unbind_using_user_id (user_id);
-
- if (result != 0)
+ if (this->poa_->unbind_using_user_id (user_id) != 0)
throw ::CORBA::OBJ_ADAPTER ();
}