On 4/7/11 8:04 AM, Heiko W.Rupp wrote:
Hi,
sometimes it is required to change multiple attributes of a node at once.
Currently this needs to be done via composite operation that contains
multiple write-attribute calls.
If would be nice if there would be an operation that allows to
update multiple attributes (sub elements?) of a resource at once.
I see two situations here:
1) Each individual write-attribute can be applied to the runtime service
in a separate step, with the service state not being incorrect in the
middle (i.e. after step 1 is applied but step2 hasn't been applied.)
Grouping them in a composite op ensures they'll all succeed or all roll
back.
For this situation, a composite op already handles it. I can see the
desire for a less verbose variant for the case where all the steps are
"write-attribute" on the same resource, but gosh, we've got a lot of
critical stuff to do. Feel free to open a JIRA (unless what's wanted at
[1] is actually this), but I can't promise anyone will get to it. :(
2) The individual changes all need to be applied to the runtime service
at once. In this case the individual attributes shouldn't be writable
via write-attribute at all; the resource should expose a separate
operation that takes multiple parameters.
For this situation, a generic "update-resource" operation where every
attribute that needs changing is a param would be convenient, but I'm
extremely doubtful that it could be properly implemented. Every
subsystem would have to write a custom handler for each resource that
could properly deal with all permutations of incoming params.
[1]
https://issues.jboss.org/browse/JBAS-9161
--
Brian Stansberry
Principal Software Engineer
JBoss by Red Hat