Problem
- Product : VBC 5.2.1
- Product Component : Portable Interceptor
VBE 5.2.1 Client process received BAD_INV_ORDER exception on a one-way call.
The Client and Server processes use Portable Interceptor. It was found that the exception was being thrown from within the client side portable interceptor code and was thrown received_exception() call in the receive_other() method of ClientRequestInterceptor.
Questions:
1. The VBE 5.0 pi/client_server example has the received_exception() in receive_other() method whereas the VBE 5.2.1 pi/client_server examples does not have the received_exception() call in receive_other(). Why is the VBE 5.0 example having this difference ?
2. CORBA 2.5 specification does not restrict calling received_exception() in receive_other(). So, why is this call resulting in an exception in VBE 5.2.1?[
Resolution
Invoking received_exception() call in receive_other() of PI is inappropriate.
1. The change in VBE 5.2.1 example versus the VBE 5.0 example is on purpose, as these operations are not valid in these interception points as per OMG spec and mislead the user.
OMG CORBA Spec 2.5 has the following text in chapter 21, page 21.3.7.1:
============================================
The set of ending interception points is: receive_reply, receive_exception,receive_other. One and only one of these is called on any given request/reply sequence.
============================================
On page 21.3.6.5, the specification says:
============================================
This interception point (receive_other) allows an interceptor to query the information available when a request results in something other than a normal reply or an exception.
============================================
2. The above chapter 21 also has more detailed explanation on these interception points. The receive_other is a different interception point from receive_exception. One should only received_exception() when there is really an exception. That is, although CORBA specification does not restrict calling received_exception during receive_other, it is really not approriate to do that.
Old KB# 26668
#VisiBroker
#received_exception
#received_other
#PortableInterceptor
#Security
#BAD_INV_ORDER