summaryrefslogtreecommitdiff
path: root/TAO/tao/PortableServer/ServantRetentionStrategyRetain.cpp
diff options
context:
space:
mode:
authormxiong <mxiong@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2006-01-27 22:32:08 +0000
committermxiong <mxiong@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2006-01-27 22:32:08 +0000
commit64b6f8917f4a033077ea237aafbad078efa938cf (patch)
tree24a777af17f5fde2a6b8c94b5c5174cdc095b203 /TAO/tao/PortableServer/ServantRetentionStrategyRetain.cpp
parent3ca40d43e9f26767885ac5cd60c14766bde66d40 (diff)
downloadATCD-64b6f8917f4a033077ea237aafbad078efa938cf.tar.gz
ChangeLogTag:Fri Jan 27 22:03:14 UTC 2006 Ming Xiong <ming.xiong@vanderbilt.edu>
Diffstat (limited to 'TAO/tao/PortableServer/ServantRetentionStrategyRetain.cpp')
-rw-r--r--TAO/tao/PortableServer/ServantRetentionStrategyRetain.cpp39
1 files changed, 39 insertions, 0 deletions
diff --git a/TAO/tao/PortableServer/ServantRetentionStrategyRetain.cpp b/TAO/tao/PortableServer/ServantRetentionStrategyRetain.cpp
index de61b36085e..eebff4f3c73 100644
--- a/TAO/tao/PortableServer/ServantRetentionStrategyRetain.cpp
+++ b/TAO/tao/PortableServer/ServantRetentionStrategyRetain.cpp
@@ -358,6 +358,44 @@ namespace TAO
return servant;
}
+ int
+ ServantRetentionStrategyRetain::find_servant_priority (
+ const PortableServer::ObjectId &system_id,
+ CORBA::Short &priority
+ ACE_ENV_ARG_DECL)
+ {
+ PortableServer::ObjectId user_id;
+ // If we have the RETAIN policy, convert/transform from system id to
+ // user id.
+ if (this->active_object_map_->
+ find_user_id_using_system_id (system_id,
+ user_id) != 0)
+ {
+ ACE_THROW_RETURN (CORBA::OBJ_ADAPTER (),
+ -1);
+ }
+
+ // If the POA has the RETAIN policy, the POA looks in the Active
+ // Object Map to find if there is a servant associated with the
+ // Object Id value from the request. If such a servant exists, the
+ // POA invokes the appropriate method on the servant.
+ PortableServer::Servant servant = 0;
+ TAO_Active_Object_Map_Entry *active_object_map_entry = 0;
+ int result = this->active_object_map_->
+ find_servant_using_system_id_and_user_id (system_id,
+ user_id,
+ servant,
+ active_object_map_entry);
+
+ if (result == 0)
+ {
+ priority = active_object_map_entry->priority_;
+ return 0;
+ }
+
+ return -1;
+ }
+
int
ServantRetentionStrategyRetain::is_servant_in_map (
PortableServer::Servant servant,
@@ -1043,6 +1081,7 @@ namespace TAO
return this->active_object_map_->remaining_activations (servant);
}
+
::PortableServer::ServantRetentionPolicyValue
ServantRetentionStrategyRetain::type() const
{