This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript 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