This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
I am working with JAX-WS webservices. We host some webservices on the JBoss 4.2.2 Application server. Since these webservices are hosted by me, I need to set the maximum amount of time that the webservice should be allowed to process. In case the processing takes up a lot of time, i need to rollback it. Can this be achieved by JAX-WS ? All that I find by googling it points me to a nice "executionTimeout" but that's in the .NET webservices.
If there is no such parameter, what is the default time that a calling webservice is allowed to wait (regardless of the timeout of that client) ?
Thanks for the time.
Thanks for the reply.
Just a couple of questions :
So, does this mean that if my webservice goes into an infinite loop, or takes about 10hours to process, and , say the client that is invoking my webservice sets a timeout of 11hours, then everything would go fine ?(Supposing that all the other work that is done in the webservice doesn't timeout before that) I mean, I was thinking that there should be some configuration somewhere that should stop this. Please let me know if I am wrong.
I haven't used JBoss, but this will be a configuration in the JBoss Web Container thread pool. I have used this in Websphere. The default timeout is 60 seconds in Websphere. JBoss uses Tomcat. So, check the server.xml file.
Rohit Macherla wrote:So, does this mean that if my webservice goes into an infinite loop, or takes about 10hours to process, and , say the client that is invoking my webservice sets a timeout of 11hours, then everything would go fine ?
It is unrealistic that a client would stick around that long (because of client-side timeouts) and the server side resources would still be tied up.
Tomcat doesn't seem to have a request, servlet or "whatever you want to call it" timeout that limits the execution time for servlets.
So the possibility of an indefinitely hung servlet seems to be very real. This is illustrated by a comment made in the mod_jk Apache Tomcat connector documentation.
The Apache Tomcat Connector - Timeouts HowTo Reply Timeout
If JK aborts waiting for a response, because a reply timeout fired, there is no way to stop processing on the backend. Although you free processing resources in your web server, the request will continue to run on the backend - without any way to send back a result once the reply timeout fired.
(Jetty at least gives you a maxIdleTime configuration parameter).
Joined: Mar 02, 2009
Hi Peer Reynders,
Thanks a lot for your reply and your time.
We will rely on the client side timeout itself.
subject: How to specify WebService operation timeout