?
Solved

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

Posted on 2013-06-04
2
Medium Priority
?
516 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 27

Accepted Solution

by:
mrcoffee365 earned 800 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

When ransomware hits your clients, what do you do?

MSPs: Endpoint security isn’t enough to prevent ransomware.
As the impact and severity of crypto ransomware attacks has grown, Webroot has fought back, not just by building a next-gen endpoint solution capable of preventing ransomware attacks but also by being a thought leader.

Question has a verified solution.

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

Here I am going to explain creating proxies at runtime for WCF Service. So basically we use to generate proxies using Add Service Reference and then giving the Url of the WCF service then generate proxy files at client side. Ok, what if something ge…
Online collaboration is quickly becoming embedded in the workplace, and its benefits are tangible. See what the current landscape looks like and what the future holds for collaboration tools and the future of work.
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
The viewer will learn how to implement Singleton Design Pattern in Java.
Suggested Courses

650 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