You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org> on 2008/02/29 07:22:52 UTC

[jira] Commented: (AXIS2-3557) WSDL2Java should be able to generate Async MessageReceivers

    [ https://issues.apache.org/jira/browse/AXIS2-3557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12573611#action_12573611 ] 

Amila Chinthaka Suriarachchi commented on AXIS2-3557:
-----------------------------------------------------

wsdl2java generated message receivers neither extends Sync nor Async message receivers. In fact these classes are depreciated classes. It extends the AbstractInOutMessageReceiver class. Please have a look at with a nightly build.

if you take a look at the AbstractInOutAsyncMessageReceiver, you can see it sets the 
DO_ASYNC property.

 public void receive(final MessageContext messageCtx) throws AxisFault {
        messageCtx.setProperty(DO_ASYNC, Boolean.TRUE);
        super.receive(messageCtx);
    }

then if you take a look at the AbstractMessageReceiver receive method.
it looks like this. 
if (messageCtx.isPropertyTrue(DO_ASYNC)) {
            EndpointReference replyTo = messageCtx.getReplyTo();
            if (replyTo != null && !replyTo.hasAnonymousAddress()) {
                AsyncMessageReceiverWorker worker = new AsyncMessageReceiverWorker(messageCtx);
                messageCtx.getEnvelope().build();
                messageCtx.getConfigurationContext().getThreadPool().execute(worker);
                return;
            }
        }

I think the problem is with this method. Does this if (messageCtx.isPropertyTrue(DO_ASYNC)) {
check really needed? Because if there is an Addressing reply to address then any way replay has to send in a separate channel.
 On the other hand what you propose to do is to by default suppress this check using the AbstractInOutAsyncMessageReceiver. 



> WSDL2Java should be able to generate Async MessageReceivers
> -----------------------------------------------------------
>
>                 Key: AXIS2-3557
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3557
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Improvement
>            Reporter: Paul Fremantle
>
>  By default Axis2 generates synchronous services - the MessageReceivers
> extending the Sync abstract message receivers.
> The result of this is that when a client calls with a real WS-A
> non-anonymous replyto, the HTTP connection *still* blocks waiting for
> the service to finish processing.
> This is easily fixed by changing the message receiver to extend the
> Async abstract message receiver. In fact, this works really well. You
> change two letters in your generated code and now both async and sync
> calls work nicely.
> So... my proposal is that we add an option to WSDL2Java to generate this.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org