These control operations that the synapse transport is referring to is
mostly RM related control messages, so as far as RM works without an issue,
I am OK with this change.

Asankha WDYT?

Thanks,
Ruwan

On Tue, May 12, 2009 at 9:27 PM, Amila Suriarachchi <
[email protected]> wrote:

> hi,
>
> Currently nhttp worker (ServerWorker.java 206) has the following logic
>
> if (msgContext != null &&
>             msgContext.getOperationContext() != null &&
>
> !msgContext.getOperationContext().getAxisOperation().isControlOperation()))
> {
>
>        // send 202 accepted if other criterias also matched
> }
>
> This gives a problem with handling MakeConnection and
> TerminateSequenceResponse message  send by the server to client.
>
> For an example if their are no pending messages Sandesah2 sends a 202
> accepted for a  MakeConnection request. This works with axis2 http
> transport.
>
> Both MakeConnection and TerminateSequence messages are mapped to RM
> specific control messages.
>
> Therefore even I set it to NhttpConstants.FORCE_SC_ACCEPTED it will not
> pass the if condition since
> msgContext.getOperationContext().getAxisOperation().isControlOperation() is
> true.
>
> Is it possible to change this logic as follows,
>
> if (msgContext != null &&
>             msgContext.getOperationContext() != null &&
>
> (!msgContext.getOperationContext().getAxisOperation().isControlOperation()
> ||
>              msgContext.isPropertyTrue(NhttpConstants.FORCE_SC_ACCEPTED)))
> {
>
>        // send 202 accepted if other criterias also matched
> }
>
> I don't have much understanding about the synapse context. But I feel it is
> reasonable to allow send
> 202 accepted header even it is a control operation, if the
> NhttpConstants.FORCE_SC_ACCEPTED is set.
>
> WDYT?
>
> thanks,
> Amila.
>
>
> --
> Amila Suriarachchi
> WSO2 Inc.
> blog: http://amilachinthaka.blogspot.com/
>



-- 
Ruwan Linton
Senior Software Engineer & Product Manager; WSO2 ESB; http://wso2.org/esb
WSO2 Inc.; http://wso2.org
email: [email protected]; cell: +94 77 341 3097
blog: http://ruwansblog.blogspot.com

Reply via email to