Solved

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

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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
CRM 2016 Organization service not working 7 62
Java program running SQL query 5 50
junit as external jar or library 7 40
Running JavaFX on the Raspberry Pi 27 142
To properly understand GitHub, let’s divide it into two words ‘Git’ and ‘Hub’. Git is basically a ‘Distribution Version Control’ (DVC) and ‘Source Code Management’ (SCM) system widely used by software programmers while Hub means the efficient centre…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

726 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