Previous Table of Contents Next


22.2.1 Rebind Support


   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.

   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:

   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.