> On Jun 11, 2015, at 10:00 AM, Kalpak Gadre <[email protected]> wrote:
> 
> 
> What I am trying to understand now is,
> 
> 1. if I call an async method which returns a Future, which thread-pool does
> it use?

Kind of depends on the transport.   With the  HTTP transport, it would be the 
default WorkQueue obtained form the WorkQueueManager unless you have one 
specifically configured for the http-conduits. (work queue named “http-conduit)


> 2. Is there any way I can control the thread-pool each client bean uses?

The executor should work fine for this.  Without the executor, for the regular 
HTTP transport, likely yes.   You would just need to create a new Bus for each 
client if they each need their own thread pool.   


> 3. Does the Async Transport use its own thread-pool? Can I make it use
> external thread-pool?

The async transport has two thread pools that are considered.   One thread pool 
is the WorkQueue mentioned above for the threads where the “CXF” processing is 
done.   The other is the pool internal to the async client that it uses for 
decoding response packets and such.    I don’t know much about the latter.   
There are settings for controlling the size, but don’t know much more than 
that.   The executor can be used instead of the workqueue for the latter. 


> I have not found a way to set an Executor on the client proxy when I am
> creating them through Spring configuration.

Not seeing anything “easy” on that.  Hmm…

Dan


> 
> Any pointers?
> 
> Thanks,
> Kalpak
> 
> 
> On Wed, Jun 10, 2015 at 12:10 AM, Kalpak Gadre <[email protected]> wrote:
> 
>> Hi,
>> 
>> I am working on a project which is developed using Play Framework. The
>> project needs to interact with a number of third party SOAP services. It is
>> very important for the system to be scalable by design and should allow
>> high number of concurrent requests. I understand that this can be achieved
>> using Async HTTP Transport.
>> 
>> For now, I am using Java interfaces and classes generated through
>> wsdl2java utility. Currently I have generated services with synchronous
>> calls. I plan to use -asyncMethods switch and generate asynchronous
>> services.
>> 
>> I am trying to figure out how I can manage the threads used by async web
>> service calls.
>> 
>> Few questions I have are,
>> 
>> 1. How can I control the thread pool / executor used by the WS client?
>> 2. How can I shared the same thread pool / executor across multiple
>> clients?
>> 3. Does the Async HTTP transport use another thread pool / executor? Can
>> it also share the same with rest of the WS clients?
>> 4. Do I need to create a spring config and create all the client beans
>> there to be able to manage them through single CXF instance (bus)? I wonder
>> if it is a good idea to independently create WS client instances?
>> 
>> Overall I hope I am not doing anything fundamentally wrong. I hope that
>> using async client methods and async transport the system will allow
>> multiple concurrent calls.
>> 
>> Thanks,
>> 
>> Kalpak
>> 
>> 
> 
> 
> -- 
> Kalpak R. Gadre

-- 
Daniel Kulp
[email protected] - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com

Reply via email to