Problem:
Product : VBC4.x, VBC5.x
Platform: All.
How to set send_timeout and receive_time out on VBC4.x and VBC5.x?
Resolution:
There is a difference between setting the Bind Options send_timeout and receive_timeout in VBC4.x and VBC5.x. This is due to adaption to an OMG standard for QoS Messaging timeout policies. In VBC4.x the time between invocation and the exception thrown for not receiving a reply is receive_timeout. In VBC5.x the same time is equal to send_timeout receive_timeout.
If you want to keep your code compatible between 4.x and 5.x you could use a define like the example below in Windows environment:
(1) In the environment variable:
C:\\> set VBROKERVER=VBC4
(2) In the makefile:
!IF "$(VBROKERVER)" == "4" || "$(VBROKERVER)" == "VB4" || "$(VBROKERVER)" == "VBC4"
CCFLAGS = /DVBC4 $(CCFLAGS)
!ELSE
CCFLAGS = /DBES5 $(CCFLAGS)
!ENDIF
(3) In the code:
// Set BindOptions
CORBA::BindOptions* l_BindOpt = CORBA::Object::_default_bind_options();
l_BindOpt->defer_bind = 0;
l_BindOpt->send_timeout = 7;
#ifdef VBC4
l_BindOpt->receive_timeout = 3 l_BindOpt->send_timeout;
#else
l_BindOpt->receive_timeout = 3;
#endif
CORBA::Object::_default_bind_options( *l_BindOpt );
delete l_BindOpt;
#Security
#receive_time
#send_timeout
#VisiBroker



