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 <
[EMAIL PROTECTED]> 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:[EMAIL PROTECTED]
> *Sent:* Monday, September 29, 2008 1:15 PM
> *To:* [email protected]
> *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 <
> [EMAIL PROTECTED]> 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

Reply via email to