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.
2. Callback Strategy.
Probably "Callback Strategy" might be the right choice for bacth job. Correct me If I am wrong.
Joined: Oct 04, 2006
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.