2010/7/13 Bertrand Delacretaz <[email protected]> > 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. > > Or use a temporary "incoming" path for the A node, and in the listener > update B and move A to its final location in a transaction. > > -Bertrand >
I don't see the need of managing it transactionally. If I use an event listener, the node is already added, and the creation of redundant structure for tagging hasn't to be transactional. If the creation of the node in the tagging structure has some problems, we will have a dishomogeneity in the content, but I think it can be solved in another way, later. Does it make sense? -- Federico
