[Ace-users] [tao-users] How to set different message timeout policies for different calls

Sowayan, Abdullah (N-DUA) abdullah.sowayan at lmco.com
Wed Feb 13 13:48:11 CST 2008


Keith,

Please always use the PROBLEM-REPORT-FORM.

I suggest you read the following article. It gives an overview of the CORBA policy framework. You can apply policies at the following level

1- System-Level Defaults
2- ORB Level
3- Thread Level
4- Object Level

Where a higher level overrides whatever settings there are at the lower level (ie, level 4 overrides levels 3-2-1 above).

An Overview of the OMG CORBA Messaging Quality of Service (QoS) Framework
http://www.cs.wustl.edu/~schmidt/PDF/C++-report-col19.pdf

I hope this helps,
Abdul

________________________________________
From: tao-users-bounces at cse.wustl.edu [mailto:tao-users-bounces at cse.wustl.edu] On Behalf Of Keith Nicewarner
Sent: Wednesday, February 13, 2008 2:36 PM
To: tao-users at cse.wustl.edu
Subject: [tao-users] How to set different message timeout policies for different calls

I'm using the message timeout policy like this:

  // Create the policy and put it in a policy list.
  CORBA::PolicyList policies;
  policies.length(1);
  policies[0] =
    orb->create_policy(::Messaging::RELATIVE_RT_TIMEOUT_POLICY_TYPE,
                       relative_rt_timeout_as_any);

  // Apply the policy at the ORB level using the ORBPolicyManager.
  CORBA::Object_var obj = orb->resolve_initial_references("ORBPolicyManager");
  CORBA::PolicyManager_var policy_manager =
    CORBA::PolicyManager::_narrow(obj.in());
  policy_manager->set_policy_overrides(policies,
                                       CORBA::SET_OVERRIDE);

This sets the timeout for all client calls in my process (they all use the same ORB).  But I want to set different timeouts for different calls on the same object.  In fact, I might want to set the timeout dynamically (i.e. compute the timeout on the fly).  Do I need to create a separate ORB for each timeout value or can I switch the policy on the fly?  Or is there a better way to specify a per-method timeout value?

Thanks,
Keith.

********************************************************
Dr. Keith Nicewarner      keith.nicewarner at spacedev.com
Chief Software Architect                   858-375-2079
SpaceDev, Inc.                         www.spacedev.com
13855 Stowe Drive                  San Diego, CA, 92064
********************************************************
This email message and any information or files contained within or attached to this message may be privileged, confidential, proprietary and protected from disclosure and is intended only for the person or entity to which it is addressed.  This email is considered a business record and is therefore property of the SpaceDev, Inc.  Any direct or indirect review, re-transmission, dissemination, forwarding, printing, use, disclosure, or copying of this message or any part thereof or other use of or any file attached to this message, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited.  If you received this message in error, please immediately inform the sender by reply e-mail and delete the message and any attachments and all copies of it from your system and destroy any hard copies of it.  No confidentiality or privilege is waived or lost by any mis-transmission.  SpaceDev, Inc. is neither liable for proper, complete transmission or the information contained in this communication, nor any delay in its receipt or any virus contained therein.  No representation, warranty or undertaking (express or implied) is given and no responsibility or liability is accepted by SpaceDev, Inc., as to the accuracy or the information contained herein or for any loss or damage (be it direct, indirect, special or other consequential) arising from reliance on it.  NOTICE: The information contained in this transmission may contain technical data controlled for export by the U.S. Department of State, under the International Traffic in Arms Regulations (ITARs). Disclosure (including oral or visual disclosure) or transfer of this information to foreign persons is prohibited without U.S. Government authorization.



More information about the Ace-users mailing list