Problem
- Product Name: VisiBroker for C
- Product Version: ALL
- Product Component: VisiSecure
- Platform/OS Version: ALL
The CORBA::InvalidPolicies exception is raised when the policies set are not valid either because the policies are already overridden within the current scope or are not valid in conjunction with other requested policies.
Resolution
The InvalidPolicies exception is thrown because the request timeout value set is greater than round trip timeout(rtt) value. As the round trip timeout includes both sending the request and reading the reply, the request timeout value should not be greater than the rtt value.
For example, you will encounter the CORBA::InvalidPolicies exception with the following C code snippet to set 301 sec for request timeout and 300 sec for round trip timeout:
.......
CORBA::Any request_timeout_value;
CORBA::Any rt_timeout_value;
request_timeout_value <<= (CORBA::ULongLong)(301 * 1000 * 10000);
rt_timeout_value <<= (CORBA::ULongLong)(300 * 1000 * 10000);
CORBA::Policy_var request_timeout_policy = OrbPtr->create_policy(Messaging::RELATIVE_REQ_TIMEOUT_POLICY_TYPE, request_timeout_value);
CORBA::Policy_var rt_timeout_policy = OrbPtr->create_policy(Messaging::RELATIVE_RT_TIMEOUT_POLICY_TYPE, rt_timeout_value);
CORBA::PolicyList qospolicies;
qospolicies.length(2);
qospolicies[(CORBA::ULong)0] = CORBA::Policy::_duplicate(request_timeout_policy);
qospolicies[(CORBA::ULong)1] = CORBA::Policy::_duplicate(rt_timeout_policy);
.........
SI: 2614055
#roundtriptimeout
#VisiBroker
#InvalidPolicies
#rtt
#requesttimeout
#Security