On 7/13/10 9:14 AM, Bertrand Delacretaz wrote: > On Tue, Jul 13, 2010 at 3:02 PM, Mike Müller <[email protected]> wrote: >>> If you need to maintain related nodes B after saving a node A, the >>> recommended way with JCR is to use observation: you'll get a callback >>> when A is modified, and you setup B at this point, asynchronously. >> >> What would you suggest if saving of node B should be done transactionally? > > You'd then need to implement custom code (POST handler or servlet) to > save A and update B transactionally. Event listeners are called > asynchronously after the observed node is saved. You should be able to use Jackrabbit's SynchronousEventListener as well.
But I would use a SlingPostProcessor... SynchronousEventListener would be necessary if you needed to handle nodes created by methods other than the POST servlet. Justin
