Re: Setting Policies - Exception got
David Weir <[email protected]> Fri, 2 Sep 2005 10:53:49 -0230
| Newsgroups | gmane.comp.corba.orbacus |
|---|---|
| Organization | Object Oriented Concepts, Inc. - An IONA Company |
| Message-ID | <[email protected]> |
Hello Frederico,
On Thu, Sep 01, 2005 at 07:41:35PM -0300, Frederico Faria wrote:
> Hi,
>
> I have got a exception in "set_policyoverride" for
> the sample code below. Any hint ?
>
> Frederico Faria
>
> System exception `BAD_OPERATION'
> Locality: exception has been generated locally
> Completed: no
> Minor code: 0x0
>
> -----------------------------------------
> CORBA::ULong conn_timeout = 3000000;
> CORBA::Any reqTimeoutAny
> reqTimeoutAny <<= conn_timeout;
> CORBA::PolicyList policies;
> policies.length(1);
> policies[0] = _orb->create_policy(
> OB::REQUEST_TIMEOUT_POLICY_ID, reqTimeoutAny);
>
> CORBA::Object_var pmObj = _orb ->
> resolve_initial_references("ORBPolicyManager");
> CORBA::PolicyManager_var pm =
> CORBA::PolicyManager::_narrow(pmObj);
> pm -> _set_policy_overrides(policies,
> CORBA::ADD_OVERRIDE);
It looks like the name of the function call is incorrect in your code.
The PolicyManager function that you are trying to call is actually
"set_policy_overrides". It looks like you have an additional underscore
at the beginning of the function call.
Cheers,
Dave
--
David Weir
Team Orbacus - Your CORBA Source
E-Mail: [email protected]
WWW: http://www.orbacus.com
_______________________________________________
OB-Users Mailing List - [email protected]
http://mail.ooc.nf.ca/mailman/listinfo/ob-users
Visit our support FAQ before you send a message.
http://www.orbacus.com/faq/support.html