Examining section 5.2.7 of the JavaTM API for XML-Based Web Services specification (JAX-WS) seems to indicate so, although it looks like there is some room for implementation specific behavior. To really know what is going on you'd have to investigate the JAX-WS implementation you are using and the particular deployment environment. I'd imagine the behavior might be different depending upon whether the service is deployed within a Servlet container or in a standalone process. The control that you do have over the threads is limited to providing a specific ThreadPoolExecutor
implementation. Section 5.2.7 states:
5.2.7 Executor
Endpoint
instances can be configured with a java.util.concurrent.Executor
. The executor will then be used to dispatch any incoming requests to the application. The setExecutor
and getExecutor
methods of Endpoint
can be used to modify and retrieve the executor configured for a service.
<> Conformance (Use of Executor): If an executor object is successfully set on an Endpoint
via the setExecutor
method, then an implementation MUST use it to dispatch incoming requests upon publication of the Endpoint
by means of the publish(String address)
method. If publishing is carried out using the publish(Object serverContext))
method, an implementation MAY use the specified executor or another one specific to the server context being used.
<> Conformance (Default Executor): If an executor has not been set on an Endpoint
, an implementation MUST use its own executor, a java.util.concurrent.ThreadPoolExecutor
or analogous mechanism, to dispatch incoming requests.
Also, section 5.2.2 references 5.2.7 near the end of the section:
5.2.2 Publishing
...
An Endpoint
will be typically invoked to serve concurrent requests, so its implementor should be written so as to support multiple threads. The synchronized
keyword may be used as usual to control access to critical sections of code. For finer control over the threads used to dispatch incoming requests, an application can directly set the executor to be used, as described in section 5.2.7.
I realize this probably doesn't answer your question exactly, but hopefully it points you in a direction that you can get the answer you are looking for.