File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Services and the fly likes Interrupting a Web service execution Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Interrupting a Web service execution" Watch "Interrupting a Web service execution" New topic

Interrupting a Web service execution

Arun Adiththan

Joined: Apr 19, 2011
Posts: 3
Dear All,

I want to interrupt a Web service execution, say a JAX-WS service running on Glassfish server, on a button click from JSP interface and halt its further execution. Could anybody elaborate me on how to achieve this? Any suggestions in this direction would be of great help.

Thanks in advance,

A Arun
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
A suggestion, given the limited requirements:
I assume the web service you want to interrupt perform some lengthy process.
In the code implementing the lengthy process, you can add periodic testing of some flag of some kind. I would use an instance of AtomicBoolean. If this flag is set, then the lengthy process is aborted.
Clicking the button in the JSP causes some kind of code to be invoked that set the flag discussed above.
Best wishes!

My free books and tutorials:
I agree. Here's the link:
subject: Interrupting a Web service execution
It's not a secret anymore!