File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Services and the fly likes Asynchronous web service using RESTEasy Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Asynchronous web service using RESTEasy" Watch "Asynchronous web service using RESTEasy" New topic

Asynchronous web service using RESTEasy

amitkumar das

Joined: Sep 22, 2010
Posts: 3
Hi Guys,
It would be great if somebody is having a simple example for Asynchronous webservice using resteasy(RESTFul Web Services implementation of JBOSS). I am able to create synchronous webservice using resteasy, it is working fine.

My Objective is to find out a way to implement Asynchronous web service for batchjobs.

By googling, I find out 2 strategies.
1. Polling
2. Callback Strategy.

Probably "Callback Strategy" might be the right choice for bacth job. Correct me If I am wrong.

Please help.

Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
I cannot help you with the asynchronous web service client using RESTEasy.
However, what immediately comes to my mind when you say "batch job", "REST" and "asynchronous" is the following scenario:
- A batch job is submitted to the job resource.
- In connection to the job being submitted, another resource is created which (eventually) will hold the result of the job.
- The URI to the resource that will hold the result of the submitted job is returned to the client that submitted the job as part of the response to the request that submitted the job.
- The client then polls the URI (job result resource) for the result.

The above scenario is easier to implement than a "callback" version, in which the client would need to have a REST web service to which the batch job processor could submit (create) job results (job result resources).
However, if polling is undesired, implementing a "callback" version is certainly doable.
Best wishes!

My free books and tutorials:
I agree. Here's the link:
subject: Asynchronous web service using RESTEasy
It's not a secret anymore!