ws-sandesha-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chamikara Jayalath <>
Subject Re: [Axis2] Where to start the out messages in the handler flow?
Date Sun, 13 Nov 2005 18:04:45 GMT
Hi Jaliya,

Thanks for pointing this out. This is something I also felt that should be
further discussed.

As you have mentioned, the method we currently follow is adding all the
handlers of the outFlow of the request message to the response message, even
thought the response get created in a handler. (there is no inconsistency,
this is the way we follow :) ).

We could easily drop the handlers situated before the current phase (say
RMPhase) in the outFlow and make sure that the response message get
transmitted throught only the RMPhase and the phases after that. But there
is a counter argument to this.

For the Axis2 engine a phase is a marker of a area in a certain flow.
Because of this it is very possible for the set of phases in one flow to
differ from the set of phases in another flow. For example even though the
inFlow has a RMPhase the outFlow may not have it (or there may be a phase in
the outFlow named RMPhase1 which does not have a relationship with the
RMPhase when it comes to the place the Phase is sutuated). Also a module may
have a number of handlers that are situated in different phases in different
flows. Because of these complexities it is difficult to clearly identify the
starging position of an outMessage when it comes to responses that that get
created due to an activity of some handler. I also think this is something
we should clarify and we should ask the module authors to follow that
approach. But still the path is not very clear.

When it comes to the Sandesha module there is a clearly defined RMPhase and
there are only two service specific handlers which are located in the same
phase (of inFlow and outFlow). So what you propose can can be implemented
(we can drop the handlers in the outFlow before the RMPhase). But is this a
general answer ?


On 11/13/05, Jaliya Ekanayake <> wrote:
> Hi All,
>  I have noticed some inconsistency in the way we currently send outgoing
> messages from a handler. I noticed this one in Sandesha2 implementation and
> think that we need some definite way to do this at least for the modules
> that we implement.
>  Say, engine receive RM Specific Create message. We can interpret this
> message either in RMInHandle or RMMessageReceiver. In addition modules may
> have pre-dispatch handlers, in RM case we use one to eliminate duplicate
> messages.
>  If we interpret this from RMInHandler then we can stop that message from
> going through all the other handlers.
> If we interpret this from RMMessageReceiver then this message will go
> through the handlers deployed for the service.
>  Now we need to send CreateSequenceResponse message from any of the above
> two locations.
> If we send the response from RMInHandler we need to decide what is the
> handler configuration for this message. Is it all the handlers deployed for
> that service or only the handlers that are after the RMPhase? (RMHandlers
> deployed in RMPhase)
>  If we send the CreateSequenceResponse from RMMessageReceiver then this
> message will go through all the outgoing handlers deployed for that service.
>  IMHO we should interpret module specific messages using any handler in
> the module and if there is a response that we need to send for that, it
> should start from that phase. (not from the beginning of the handler flow)
> So in this way, phase n will affect only to phase n+1 as shown in the
> attached diagram.
>  We need to decide the same thing from the pre-dispatch handlers as well.
> If one pre-dispatch handler want to send a response, then what are the
> handlers that we use in the response path.
>  Thoughts?
>  Thanks,
>  Jaliya

View raw message