Solved

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

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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

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…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
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…
This video teaches viewers about errors in exception handling.

688 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