My application uses JAX-RS to build its external API. I think the
implementation is as you'd expect: requests are dispatched to the
appropriate resource, based on the @Path, @GET, @POST, @DELETE, etc.
annotations.

I'm trying to build a "batch" endpoint for this API. The idea is that the
endpoint would have a single resource, which, when it gets a POST, would
create a new database transaction, dispatch to a number of other endpoints,
and commit the transaction. Any dispatch failures would roll back the
transaction. The body of the POST would contain information on what to
dispatch (i.e. it'd be a list where each item is an HTTP method, a URL, and
a body).

My problem: how do I redispatch from inside my batch endpoint? I'd like to
call into CXF for each batch list item, otherwise I have to do all the
argument marshaling myself. Put another way, I want to give CXF an HTTP
method, a URL, and a body, and have it call the appropriate resource in the
appropriate way for me. How do I do that?

Reply via email to