Previous | Table of Contents | Next |
22.2.1.1 typedef short RebindMode
Describes the level of transparent rebinding that may occur during the course of an invocation on an Object. Values of type
RebindMode are used in conjunction with a RebindPolicy
, as described in Section 22.2.1.2, “interface RebindPolicy,? on
page 22-5. All non-negative values are reserved for use in OMG specifications. Any
negative value of RebindMode is considered a vendor extension.
• TRANSPARENT - allows the ORB to silently handle object-forwarding and necessary reconnection during the course of making a remote request. This is equivalent to the only defined CORBA ORB behavior.
• NO_REBIND - allows the ORB to silently handle reopening of closed connections while making a remote request, but prevents any transparent object-forwarding that would cause a change in client-visible effective QoS policies. When this policy is in effect, only explicit rebinding (through CORBA::Object::validate_connection) is allowed.
• NO_RECONNECT - prevents the ORB from silently handling object-forwards or the reopening of closed connections. When this policy is in effect, only explicit rebinding and reconnection (through CORBA::Object::validate_connection) is allowed.
22.2.1.2 interface RebindPolicy
This interface is a local object derived from CORBA::Policy. It is used to indicate whether the ORB may transparently rebind
once successfully bound to a target. For GIOP-based protocols an object reference is considered bound once it is in a state
where a LocateRequest message would result in a LocateReply message with status OBJECT_HERE. If the effective Policy of this
type has a rebind_mode value of TRANSPARENT (always the default and the only valid value in CORBA), the ORB will silently
handle any subsequent LocateReply messages with OBJECT_FORWARD status or Reply messages with LOCATION_FORWARD status. The
effective policies of other types for this object reference may change from invocation to invocation. If the effective Policy
of this type has a rebind_mode value of NO_REBIND, the ORB will raise a REBIND system exception if any rebind handling would
cause a client-visible change in policies. This could happen under the following circumstances:
• The client receives a LocateReply message with an OBJECT_FORWARD status and a new IOR that has policy requirements incompatible with the effective policies currently in use.
• The client receives a Reply message with LOCATION_FORWARD status and a new IOR that has policy requirements incompatible with the effective policies currently in use.
If the effective Policy of this type has a rebind_mode value of NO_RECONNECT, the ORB will raise a REBIND system exception
if any rebind handling would cause a client-visible change in policies, or if a new connection must be opened. This includes
the reopening of previously closed connections as well as the opening of new connections if the target address changes (for
example, due to a LOCATION_FORWARD reply). For connectionless protocols, the meaning of this effective policy must be specified,
or it must be defined that NO_RECONNECT is an equivalent to NO_REBIND. Regardless of the effective RebindPolicy, rebind or
reconnect can always be explicitly requested through an invocation of CORBA::Object::validate_connection. When instances of
RebindPolicy are created, a value of type RebindMode is passed to CORBA::ORB::create_policy. This policy is only applicable
as a client-side override. When an instance of RebindPolicy is propagated within a PolicyValue in an INVOCATION_POLICIES Service
Context, the ptype has value REBIND_POLICY_TYPE and the pvalue is a CDR encapsulation containing a RebindMode.