Product: OpenFusion TAO
Version: 1.3
Description:
When using the SyncScope policy SYNC_NONE for oneway calls the server never receives requests sent by client.
Solution:
The non-delivery of messages is a consequence of TAO's selection of an eager message buffering policy when the SYNC_NONE policy is used.
This defaults to buffering the messages until some event (such as a normal CORBA message invocation) causes the buffer to be flushed.
Applying a buffering constraint such as BUFFER_FLUSH causes the messages to be delivered. E.g.
Messaging::SyncScope sync = Messaging::SYNC_NONE;
// Setup the none sync scope any.
CORBA::Any sync_any;
sync_any <<= sync;
TAO::BufferingConstraint constraint;
CORBA::Any constraint_any;
constraint.mode = TAO::BUFFER_FLUSH;
constraint_any <<= constraint;
// Setup the sync scope policy list.
CORBA::PolicyList sync_policy_list (2);
sync_policy_list.length (2);
// Setup the none sync scope policy.
sync_policy_list[0] = orb->create_policy (Messaging::SYNC_SCOPE_POLICY_TYPE, sync_any);
sync_policy_list[1] = orb->create_policy (TAO::BUFFERING_CONSTRAINT_POLICY_TYPE, constraint_any);
// Setup the sync scope.
policy_manager->set_policy_overrides (sync_policy_list,CORBA::ADD_OVERRIDE);
#KnowledgeDocs
#OpenFusionTAO
#OpenFusion