Hi all,
I'm starting studying
java web services with JAX WS. The first chapter of the book I'm reading shows how to build and publish a simple jax ws web service using only java SE. In particular, the web service is published through the Endpoint class. After publishing the web service, the author specifies that
"Out of the box, the Endpoint publisher handles one client request at a time ... if the processing of a given request should hang, then all other client requests are effectively blocked. An example at the end of this chapter shows how Endpoint can handle requests concurrently so that one hung request does not block the others."
To see this, I tried to send two requests to a web service with 2 threads. Here is the code:
If I start MyClient class, the
thread called "miao" sends its request and then goes to sleep. However, the thread called "bau" does not wait for the previous request and its request is immediately satisfied.
I get the same result if I call the WS with SoapUI using 2 different request instances.
Am I missing something? Can java threads be used to simulate multiple requests?
Thanks a lot for your help,
Nico