Hi,
I figured that the Client classes that are generated have an ability to set
an executor on it, although I have now managed to migrate to Spring IOC (I
was using Guice) which has allowed to me make things more easier to
configure.
I have declared client beans in Spring XML like below and I am able to
inject them into other components.
<jaxws:client id="lntSoapClient"
serviceClass="com.test.MyServiceInterface"
address="http://somedomain/services/Service1"
bus="mybus">
<jaxws:properties>
<entry key="executor" value-ref="akkaExecutor"/>
</jaxws:properties>
</jaxws:client>
I have also managed to enable the Async HTTP transport working which has
given noticeable performance gain (I am still using synchronous method
calls, I am puzzle about this)
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?
2. Is there any way I can control the thread-pool each client bean uses?
3. Does the Async Transport use its own thread-pool? Can I make it use
external thread-pool?
I have not found a way to set an Executor on the client proxy when I am
creating them through Spring configuration.
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