Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Interrupting a Web service execution

 
Arun Adiththan
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic