Bug 2806

Summary: Collocated AMI don't execute the callback on completion
Product: TAO Reporter: hans.utz
Component: AMIAssignee: Johnny Willemsen <jwillemsen>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P3    
Version: 1.5.7   
Hardware: All   
OS: All   
Bug Depends on: 2909    
Bug Blocks: 2805, 2890    

Description hans.utz 2007-02-13 11:56:27 CST
After the invocation of a collocated AMI call, the callback on the object,
passed in from the client as first argument is not executed.

A test-case for this was added to tests/AMI/client.cpp that demonstrates that
problem.
Comment 1 Johnny Willemsen 2007-02-13 13:58:35 CST
accept
Comment 2 Johnny Willemsen 2007-04-09 13:08:35 CDT
mine
Comment 3 Johnny Willemsen 2007-04-10 14:12:18 CDT
we have to extend the AMI regression to test for in case of a normal reply and in case of an exception
Comment 4 Johnny Willemsen 2007-04-11 08:50:20 CDT
the invocation of the reply handler is only available at this moment in the remote case, all handling of arguments, status, etc is in the generated code by the idl compiler. Maybe we could change the ami reply handler stub to also accept an argument array just like the regular stubs.
Comment 5 Johnny Willemsen 2007-04-20 14:42:53 CDT
updated version bug 2805 is not fixed, the regression for 2805 now gets a step further, this bug is now causing the failure of 2805
Comment 6 Steve Totten 2007-04-23 07:18:17 CDT
[Johnny Willemsen  2007-04-20 14:42:53]
>
> updated version bug 2805 is not fixed, the regression for 2805 now gets a step
> further, this bug is now causing the failure of 2805

Made Bug 2806 a blocker for Bug 2805, instead of the other way around.
Comment 7 Johnny Willemsen 2007-04-23 09:07:01 CDT
Did further analyze and prototyping. At the moment the servant has been called from upcall_wrapper we do get the arguments back with the out arguments. The reply handler is known in the Asynch_Invocation_Adapter but this doesn't get the out values. The out values are normally stored as stream in the tao_server_request but  in a collocated case there is no stream. The current proposal is now to put the reply dispatcher in the operation details when doing an ami collocated call, this is then checked in the TAO_AMI_Arguments_Converter_Impl, if there is a reply dispatcher, the TAO_AMI_Arguments_Converter_Impl will marshal the out/return value into a stream and invoke the reply handler at that moment. 
Comment 8 Johnny Willemsen 2007-04-24 04:25:53 CDT
Tue Apr 24 09:22:12 UTC 2007  Johnny Willemsen  <jwillemsen@remedy.nl>

        * tao/Messaging/AMI_Arguments_Converter_Impl.cpp:
          Implemented the convert_reply. When there is a reply
          dispatcher (set in the collocated case), we do invoke the
          reply dispatcher to call the reply handler. This fixes
          bugzilla 2806

        * tao/Messaging/Asynch_Invocation_Adapter.cpp:
          In case doing a collocated AMI call set the reply
          dispatcher in the operation details. This is needed to
          call the reply dispatcher after the servant has been
          invoked.

        * tao/operation_details.h:
        * tao/operation_details.inl:
          Added reply dispatcher as optional member with get/set
          methods

        * tao/Messaging/Messaging.h:
        * tao/Messaging/Asynch_Invocation_Adapter.cpp:
        * tao/Messaging/Asynch_Reply_Dispatcher.cpp:
        * tao/Messaging/Asynch_Reply_Dispatcher.h:
        * tao/Messaging/Asynch_Invocation_Adapter.h:
          We do call the reply handler stub instead of skeleton, so did
          some rename actions