Hi Alex, Thanks a lot for the crystal clear explanation. I'll try to hack this in my system over the weekend and let you guys know if there are any complications.
thanks again, Thilina On Sun, Feb 10, 2008 at 11:59 PM, Alex Boisvert <[EMAIL PROTECTED]> wrote: > On 2/9/08, Thilina Gunarathne <[EMAIL PROTECTED]> wrote: > > > > The behavior is set at the message exchange level. The IL is > responsible > > to > > > call replyAsync() for asynchronous replies. In the synchronous case, > it > > > would directly call on of reply() or replyWithFault(). > > > > I'm a bit confused... In the Axis2 integration code, I see only > > synchronous > > external invokes only.. According to what I understood, if it's > > request-reply, then ode creates a ODE schedulable object and pass it to > > the > > scheduler.. Then calls replyAsync().. But the actual invocation seems to > > happen in a sync way, though ODE sees it as async due to the scheduler. > > Please correct me if I understood anything wrong.. > > Our external services can take hours to respond.. So I'm looking for > > transport level asynchronousy using addressing reply-to.. > > > Oh, sorry, I wasn't clear. What I meant to say is that it would be > possible > do to async invocation, not that everything was in place. The code as is > it > today supports asynchronous invocations (e.g. JMS) but holds a thread > while > doing so, because it uses the synchronous Axis2 ServiceClient API. > > Here's how the interaction would look like for a "true" asynchronous > invoke, > > 1) Engine calls PartnerRoleChannel.invoke(odeMex), which is implemented by > ExternalService in the Axis2 IL. > 2) ExternalService registers a JTA synchronization, and calls > odeMex.replyAsync() > 3) Engine commits transaction, causing JTA synchronization to be called > 4) Synchronization performs the actual invoke, sending a request message > via > Axis2 OperationClient.execute() and registering a Callback for the > response > > [Any amount of time here] > > 5) Response message is received in Axis2, Callback is called, and Callback > calls ExternalService.reply() > 6) ExternalService calls odeMex.reply(response) > > So the only thing that's missing right now is registering a Callback (in > #4 > above) and wiring it to call ExternalService.reply (#5). > > Makes sense? > > alex > -- Thilina Gunarathne - http://thilinag.blogspot.com
