summaryrefslogtreecommitdiff
path: root/TAO/tao/RTPortableServer/RT_POA.i
diff options
context:
space:
mode:
authorirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-05-01 20:34:07 +0000
committerirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-05-01 20:34:07 +0000
commitc42b22ced24257ee4c3eb38320f276735e5e310e (patch)
tree6480c62ab37dd16517cdce9549c152af24d7320a /TAO/tao/RTPortableServer/RT_POA.i
parent963c06c7add2164f86921f278a785e7808083cc6 (diff)
downloadATCD-c42b22ced24257ee4c3eb38320f276735e5e310e.tar.gz
ChangeLogTag: Thu May 01 16:15:29 2003 Irfan Pyarali <irfan@oomworks.com>
Diffstat (limited to 'TAO/tao/RTPortableServer/RT_POA.i')
-rw-r--r--TAO/tao/RTPortableServer/RT_POA.i57
1 files changed, 44 insertions, 13 deletions
diff --git a/TAO/tao/RTPortableServer/RT_POA.i b/TAO/tao/RTPortableServer/RT_POA.i
index 90566725d01..07109328906 100644
--- a/TAO/tao/RTPortableServer/RT_POA.i
+++ b/TAO/tao/RTPortableServer/RT_POA.i
@@ -65,12 +65,28 @@ TAO_RT_POA::activate_object_with_priority (PortableServer::Servant servant,
this->validate_priority (priority ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (0);
- // Lock access for the duration of this transaction.
- TAO_POA_GUARD_RETURN (0);
-
- return this->activate_object_i (servant,
- priority
- ACE_ENV_ARG_PARAMETER);
+ while (1)
+ {
+ int wait_occurred_restart_call = 0;
+
+ // Lock access for the duration of this transaction.
+ TAO_POA_GUARD_RETURN (0);
+
+ PortableServer::ObjectId *result =
+ this->activate_object_i (servant,
+ priority,
+ wait_occurred_restart_call
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ // If we ended up waiting on a condition variable, the POA state
+ // may have changed while we are waiting. Therefore, we need to
+ // restart this call.
+ if (wait_occurred_restart_call)
+ continue;
+ else
+ return result;
+ }
}
ACE_INLINE void
@@ -90,13 +106,28 @@ TAO_RT_POA::activate_object_with_id_and_priority (const PortableServer::ObjectId
this->validate_priority (priority ACE_ENV_ARG_PARAMETER);
ACE_CHECK;
- // Lock access for the duration of this transaction.
- TAO_POA_GUARD;
-
- this->activate_object_with_id_i (oid,
- servant,
- priority
- ACE_ENV_ARG_PARAMETER);
+ while (1)
+ {
+ int wait_occurred_restart_call = 0;
+
+ // Lock access for the duration of this transaction.
+ TAO_POA_GUARD;
+
+ this->activate_object_with_id_i (oid,
+ servant,
+ priority,
+ wait_occurred_restart_call
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ // If we ended up waiting on a condition variable, the POA state
+ // may have changed while we are waiting. Therefore, we need to
+ // restart this call.
+ if (wait_occurred_restart_call)
+ continue;
+ else
+ return;
+ }
}
ACE_INLINE void *