Solved

how to return ACK response  before starting the process of a java method

Posted on 2013-06-04
2
468 Views
Last Modified: 2013-06-11
I am trying to create a web service that is based on Java classes.I would like to run code after an acknowledge message has been returned within a Java method. Something like

1. Call a specific operation (method) of my web service
2. Start processing X
3. Send an ack response that the processing has been started
4. Continue processing X

How can I implement something like this?
Thanks in advance
0
Comment
Question by:discoeterno
2 Comments
 
LVL 26

Accepted Solution

by:
mrcoffee365 earned 200 total points
ID: 39223220
This is called asynchronous processing.  If you google for java and that, you'll find more references.

What you do is pass off the long processing -- the stuff that happens asynchronously -- to a thread which is separate from the web server context.  The web server servlet context responds with "we're working on it" and you send an email or something like that when the asynchronous thread completes processing.

There are other ways to do it, all of them involve having 2 different processing threads or 2 completely different processors, to handle the 2 tasks.

It's also possible to have javascript on a page -- if the soap context is based on a web interface -- tell the user that you're working on it, while the main servlet context continues with the long processing.  Again -- 2 processes for the 2 different tasks.
0
 

Author Closing Comment

by:discoeterno
ID: 39239663
thanks for the information!
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

For some reason Google Apps has decided to reserve 'www' for your new domain which results in an error when trying to map the web address 'www' to a certain site in your Google Sites. The error is 'this address is already being used' and after some …
While working on Silverlight and WCF application, I faced one issue where fault exception occurred at WCF operation contract is not getting propagated to Silverlight client. So after searching net I came to know that it was behavior by default for s…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now