axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "keith chapman" <keithgchap...@gmail.com>
Subject Re: What is the advantage of using async clients if Axis creates a wait thread for every request?
Date Mon, 29 Sep 2008 17:47:21 GMT
When you send out the first request the server would spin up in the client
side and it will not die. Hence it will be used to listen for responses of
subsequent request.

In order to use a separate listener at the client side you just need to do
this,

stub._getServiceClient().engageModule("addressing");
        stub._getServiceClient().getOptions().setUseSeparateListener(true);

Axis2 would handle everything else for you.

Thanks,
Keith.

On Mon, Sep 29, 2008 at 11:06 PM, Franklin, Allen <
Allen.Franklin@avocent.com> wrote:

>  Would the technique that you are suggesting require the client to listen
> on a different/separate TCP/IP port for every outstanding request?
>
>
>
> *From:* keith chapman [mailto:keithgchapman@gmail.com]
> *Sent:* Monday, September 29, 2008 1:15 PM
> *To:* axis-user@ws.apache.org
> *Subject:* Re: What is the advantage of using async clients if Axis
> creates a wait thread for every request?
>
>
>
> Axis2 client support two levels of async behavior. One of them is the one
> you've explained. This is something like pseudo async. The other is where
> you send a request and then listen on a separate port (by spinning up a
> simple http server on the client) for the response (It is compulsory that
> you use WS-Addressing for this to work). This does not block a thread.
>
> Thanks,
> Keith.
>
> On Mon, Sep 29, 2008 at 10:38 PM, Franklin, Allen <
> Allen.Franklin@avocent.com> wrote:
>
> It is my understanding that Axis2 v1.4 creates a thread to wait for the
> reply for every async client request.
>
> What is the advantage (on the client side) of using Axis2
> async/non-blocking clients if Axis creates a wait thread for every request?
>
> In fact the blocking call seems more efficient because it saves Axis the
> trouble of having to create another thread.
>
> There appears to be a cost of one thread per outstanding for the duration
> of the call with either way, blocking or non-blocking.
>
>
>
>
> --
> Keith Chapman
> Senior Software Engineer
> WSO2 Inc.
> Oxygenating the Web Service Platform.
> http://wso2.org/
>
> blog: http://www.keith-chapman.org
>



-- 
Keith Chapman
Senior Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/

blog: http://www.keith-chapman.org

Mime
View raw message