Skip to main content

Can I Include a response timeout into a webservice atomic transaction ?

Please note these forums are being decommissioned and use the new and improved forums at
1 reply [Last post]
Joined: 2011-06-06


I have a servlet that call a transactional webservice and need to get a response quickly, so I use : ((BindingProvider)wsPort).getRequestContext().put("", 5000); to specify that if the webservice take more than 5 seconde to responde we just throw a timeout exception, and in the catch clause I rollback the transaction. (wsPort is the interface client of my webservice)

So what I want is to rollback all the transactions that have been made by my webservice if I get a timeout exception, but when I specify that my webservice is a transactional one I just get an exception that says something like a "The transaction have been cut off" (I can provide a more detailed error log if you ask me) and he commit in the Data base

Is there another way to specify a request timeout with the WS-AT? or am I doing something wrong?

Any help or idea will be welcome!



Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2004-03-04


You are not using the right timeout setting, you are defining the connect timeout, ie the max time to establish the TCP connection. If you want to set the read timeout use setting instead. cf



PS: Oualid si tu ne sais pas, demande-moi plutôt que de poster sur les forums, comme ca je peux meme te répondre en francais ;-)