It's not a secret anymore!*
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 Murach's Java Servlets and JSP this week in the Servlets 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
 
wood burning stoves
 
subject: Interrupting a Web service execution
 
Similar Threads
i want to know how do you invoke any string,array,object data from web service
"Synchronized" method in Web Services
How is web service compostion implemented programatically?
wait() in web services
stop synchronous web service call