Solved

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

Posted on 2013-06-04
2
478 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 27

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
groupNoAdj 7 87
PDFBox - convert image to PDF, PDF resolution 3 122
Eclipse IDE - Cannot copy/paste from console output 8 132
Authentication of Web Services 3 54
The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

863 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

24 Experts available now in Live!

Get 1:1 Help Now