my dog learned polymorphism
The moose likes Web Services and the fly likes To keep request alive in a webservice Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "To keep request alive in a webservice" Watch "To keep request alive in a webservice" New topic

To keep request alive in a webservice

Gurvinder Singh

Joined: Nov 10, 2008
Posts: 27

I have a problem where i am exposing a webservice to a third party.
The request size is very huge around 8MB, so by the time the request gets processed at my server end, the request times out and the response is not able to reach the source.
We have increased the time out settings on Jboss and Apache but we cannot increase it beyond some point.
So is there away the i can send keep alive signal to the source to prevent the request from getting timedout.

William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13035
I suggest substituting a series of steps for your existing one huge request because, as you have found, trying to keep a single request live is full of problems.

1. submit huge dataset - reply says OK, got it, job ID is X

2. start processing X - reply says OK started

3. how is X doing? reply says either - still working or DONE

4. retrieve the result of X

This approach has the HUGE advantage of letting the client do other things while waiting for the result, processing can even run overnight.

I agree. Here's the link:
subject: To keep request alive in a webservice
It's not a secret anymore!