[Jersey] ReST question

From: Noah White <>
Date: Mon, 6 Feb 2012 11:22:19 -0500

This is more of a general ReST question then Jersey specific but I am implementing things with Jersey so I thought I'd post it. Let's say I have 3 objects

Class Foo
Class Bar
Class Baz

and I want the workflow involving the three to look like so:

Update property A on Foo to some new value
Delete Bar if a Bar
Update a property on Baz

One approach I have seen taken in similar circumstances is something like so:

PUT some new value to /resource/foos/{id}/property
which Redirects to a DELETE /resource/bars/{id}
which Redirects to a PUT some new value to /resource/bazs/{id}

The problem I have is that I need the workflow to occur in a single transaction. I could easily do something like:

PUT some new value /actions/reset/foos/{id}/propery

And have that endpoint handle the entire workflow in 1 TX but that's more RPCish behavior then ReST like.

Thoughts? Thnx,