File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Interrupting a Web service execution" Watch "Interrupting a Web service execution" New topic
Author

Interrupting a Web service execution

Arun Adiththan
Greenhorn

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,



Regards,
A Arun
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
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: http://www.slideshare.net/krizsan
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Interrupting a Web service execution