// Load the policy manager
CORBA::Object_var object=orb->resolve_initial_references("ORBPolicyManager");
CORBA::PolicyManager_var policyManager=CORBA::PolicyManager::_narrow(object);
// Create the timeout policy, setting policy to 1 ms, in 100's of nanoseconds
CORBA::PolicyList timeoutPolicy(1);
timeoutPolicy.length(1);
timeoutPolicy[0] = orb->createPolicy(RELATIVE_RT_TIMEOUT_POLICY_TYPE, 10000)
// Set the timeout policy with the ORB
policyManager->set_policy_overrides(timeoutPolicy, SET_OVERRIDE);
Example 5: Setting the Timeout policy.
Back to Article