[ 
https://issues.apache.org/activemq/browse/SM-1592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46029#action_46029
 ] 

Freeman Fang commented on SM-1592:
----------------------------------

Hi Ron,
Yeah, this patch locks to the two-way async cxf-bc consumer thread until we get 
response from the NMR, since we do need the response before we can return soap 
message to external client.

As to the smx-http consumer you mentioned, even it use jetty continuations, if 
I understand correctly, it also block the thread until get response from the 
NMR, see the code at this line
boolean result = cont.suspend(to);
this is the code for suspend from jetty
public boolean suspend(long timeout)
    {
        synchronized (_mutex)
        {
            _new=false;
            _pending=true;
            boolean result;
            try
            {
                if (!_resumed && timeout>=0)
                {
                    if (timeout==0)
                        _mutex.wait();
                    else if (timeout>0)
                        _mutex.wait(timeout);
                        
                }
            }
            catch (InterruptedException e)
            {
                e.printStackTrace();
            }
            finally
            {
                result=_resumed;
                _resumed=false;
                _pending=false;
            }
            
            return result;
        }
    }

so, IMHO it's no real difference between the cxf bc consumer and http consumer.
All in all, for the consumer, we do need block somewhere to wait the response 
back from NMR if the transport itself is sync.

Besides that, something similar with cxf jms transport as we discussed before, 
we just leverage the cxf transport in smx but we can't and shouldn't touch the 
transports level details in smx.

Regards
Freeman

> cxf-bc consumer should allow async sending of message exchanges to the NMR
> --------------------------------------------------------------------------
>
>                 Key: SM-1592
>                 URL: https://issues.apache.org/activemq/browse/SM-1592
>             Project: ServiceMix
>          Issue Type: Improvement
>          Components: servicemix-cxf-bc
>    Affects Versions: 3.2.2
>            Reporter: Ron Gavlin
>            Assignee: Freeman Fang
>             Fix For: 3.2.3, 3.3
>
>
> cxf-bc consumer should allow async sending of message exchanges to the NMR. 
> Currently, two-way requests are always sent synchronously. I would think that 
> two-way requests should by sent asynchronously by default, similar to how 
> most other smx-bc consumers behave. The synchronous boolean property should 
> be exposed via xbean and probably set to false by default.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to