Skip to main content

Problem:

What is defer_bind in in CORBA::BindOptions and what is its effect?

Resolution:

  • Product Name:VisiBroker
  • Product Version:All
  • Platform/OS version: All
  • JDK: Not Applicable
  • Patch: Not Applicable

The property defer_bind is one of the BindOptions members. When set to true, the bind method creates a proxy object (if necessary) and returns an object reference to  client application. A connection will not be established with the object implementation until client application actually invokes a method on the object. If set to false, the connection will be established when bind is invoked. The default behavior is to establish the connection at the time the bind method is invoked.


A simple test case is attached to illustrate the impact of defer_bind. It is adapted from $VBROKERDIR/examples/vbroker/boa/bank example. Copy the Client.C file to $VBROKERIDR/examples/vbroker/boa/bank directory. Compile the code and follow the steps below to run the test on two different machines.

  1. start the server 
  2. start WireShark and use ip.src and ip.dst to filter the network traffic packet
  3. start client and wait until it prints out "Wait here ... Press 1 to continue"
  4. if defer_bind is set to false, from the WireShark display, you will see TCP SYN data being sent; while if defer_bind is set to true, no data is sent at all
  5. Press "1" to continue Client
  6. again, if defer_bind is set to true, you will see TCP SYN data 
    (GIOP message is sent when client invocation -- "open" -- is issued)

CAVEAT: BindOptions is deprecated and customer is not encouraged to use it. Please use QoSExt::DeferBindPolicy instead.

Author: Guo Yijing

Client.C
Old KB# 29546

#Security
#VisiBroker