Inline...<br><br><div class="gmail_quote">On Mon, Oct 22, 2012 at 3:16 PM, Brian Stansberry <span dir="ltr"><<a href="mailto:brian.stansberry@redhat.com" target="_blank">brian.stansberry@redhat.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It's a reasonable thing to look at in AS 8. There are really two<br>
concerns I have with it:<br>
<br>
1) It can't become another complex coding requirement that subsystem<br>
developers have to add into what they do. It needs to be something that<br>
the infrastructure can handle for the subsystems.<br>
<br>
2) Boot speed. I'm concerned about a lot of logic during boot to<br>
generate the resource metadata and then compare each "add" ops to it in<br>
order to figure out how to split up the add op.<br>
<br>
BTW in case it's helpful, have a look at<br>
GenericSubsystemDescribeHandler. It's a class that takes a subsystem<br>
model (in the Host Controller) and converts it into a series of<br>
operations (for execution on a server during boot). It assumes a<br>
"default" subsystem model, where the set of writable attributes exposed<br>
by each resource in the subsystem tree matches the set of params exposed<br>
by the resource's "add" operation. Subsystems, however, aren't required<br>
to follow that pattern.<br></blockquote><div>Best way to get this operations would be just to call :describe operation for a subsystem, that gives you list of operations to (re)generate resource structure.<br>GenericSubsystemDescribeHandler is just default one and does not work for few exceptions. <br>
Also output of that operation is tested in subsystem tests so you can relay on it to produce proper operations.<br><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><br>
<br>
On 10/22/12 4:38 AM, Heiko Braun wrote:<br>
><br>
> Yes, right. I meant to ask:<br>
> Does this sound like a reasonable feature to add? The ability to<br>
> recursively invoke add operations?<br>
><br>
> I.e. operation=add, recursive=true, [...]<br>
><br>
> So that the management layer takes care of breaking it up into multiple<br>
> "add" invocations?<br>
><br>
><br>
> On Oct 22, 2012, at 11:31 AM, Tomaž Cerar <<a href="mailto:tomaz.cerar@gmail.com">tomaz.cerar@gmail.com</a><br>
</div><div><div class="h5">> <mailto:<a href="mailto:tomaz.cerar@gmail.com">tomaz.cerar@gmail.com</a>>> wrote:<br>
><br>
>> Hi,<br>
>><br>
>> given example below, your problem is that you are calling one add<br>
>> operation where you should be calling many. for example provided it<br>
>> should be something like this (not tested)<br>
>><br>
>> {<br>
>> "operation" => "add",<br>
>> "address" => [<br>
>> ("host" => "master"),<br>
>> ("server-config" => "prod_copy")<br>
>> ],<br>
>> "auto-start" => true,<br>
>> "cpu-affinity" => undefined,<br>
>> "group" => "production-1",<br>
>> "interface" => undefined,<br>
>> "path" => undefined,<br>
>> "priority" => undefined,<br>
>> "socket-binding-group" => "full-sockets",<br>
>> "socket-binding-port-offset" => 150<br>
>> }<br>
>><br>
>> {<br>
>> "operation" => "add",<br>
>> "address" => [<br>
>> ("host" => "master"),<br>
>> ("server-config" => "prod_copy")<br>
>> ("jvm" => "default")<br>
>> ],<br>
>> "agent-lib" => undefined,<br>
>> "agent-path" => undefined,<br>
>> "debug-enabled" => false,<br>
>> "debug-options" => undefined,<br>
>> "env-classpath-ignored" => undefined,<br>
>> "environment-variables" => undefined,<br>
>> "heap-size" => "256m",<br>
>> "java-agent" => undefined,<br>
>> "java-home" => undefined,<br>
>> "jvm-options" => undefined,<br>
>> "max-heap-size" => "256m",<br>
>> "max-permgen-size" => undefined,<br>
>> "permgen-size" => undefined,<br>
>> "stack-size" => undefined,<br>
>> "type" => undefined<br>
>> }<br>
>><br>
>> {<br>
>> "operation" => "add",<br>
>> "address" => [<br>
>> ("host" => "master"),<br>
>> ("server-config" => "prod_copy")<br>
>> ("system-property" => "test")<br>
>> ],<br>
>> "boot-time" => false,<br>
>> "value" => "value"<br>
>> }<br>
>><br>
>> basicly every resource needs its own add operation<br>
>><br>
>> --<br>
>> tomaz<br>
>><br>
>> On Mon, Oct 22, 2012 at 11:17 AM, Heiko Braun <<a href="mailto:hbraun@redhat.com">hbraun@redhat.com</a><br>
</div></div><div><div class="h5">>> <mailto:<a href="mailto:hbraun@redhat.com">hbraun@redhat.com</a>>> wrote:<br>
>><br>
>><br>
>><br>
>><br>
>> I am working on a use cases that enables people to "copy"<br>
>> resources. I.e. creating a clone of a server configuration under a<br>
>> new name. I've realised that recursive add operations, covering a<br>
>> larger resource tree don't seem to work (see example below). Is<br>
>> there any "switch" that I am not aware of, or this simply not work<br>
>> due to the design of the operation handlers?<br>
>><br>
>><br>
>> [INFO] {<br>
>> [INFO] "operation" => "add",<br>
>> [INFO] "address" => [<br>
>> [INFO] ("host" => "master"),<br>
>> [INFO] ("server-config" => "prod_copy")<br>
>> [INFO] ],<br>
>> [INFO] "auto-start" => true,<br>
>> [INFO] "cpu-affinity" => undefined,<br>
>> [INFO] "group" => "production-1",<br>
>> [INFO] "interface" => undefined,<br>
>> [INFO] "path" => undefined,<br>
>> [INFO] "priority" => undefined,<br>
>> [INFO] "socket-binding-group" => "full-sockets",<br>
>> [INFO] "socket-binding-port-offset" => 150,<br>
>> [INFO] "jvm" => {"default" => {<br>
>> [INFO] "agent-lib" => undefined,<br>
>> [INFO] "agent-path" => undefined,<br>
>> [INFO] "debug-enabled" => false,<br>
>> [INFO] "debug-options" => undefined,<br>
>> [INFO] "env-classpath-ignored" => undefined,<br>
>> [INFO] "environment-variables" => undefined,<br>
>> [INFO] "heap-size" => "256m",<br>
>> [INFO] "java-agent" => undefined,<br>
>> [INFO] "java-home" => undefined,<br>
>> [INFO] "jvm-options" => undefined,<br>
>> [INFO] "max-heap-size" => "256m",<br>
>> [INFO] "max-permgen-size" => undefined,<br>
>> [INFO] "permgen-size" => undefined,<br>
>> [INFO] "stack-size" => undefined,<br>
>> [INFO] "type" => undefined<br>
>> [INFO] }},<br>
>> [INFO] "system-property" => {"test" => {<br>
>> [INFO] "boot-time" => false,<br>
>> [INFO] "value" => "value"<br>
>> [INFO] }}<br>
>> [INFO] }<br>
>><br>
>><br>
>> _______________________________________________<br>
>> jboss-as7-dev mailing list<br>
</div></div>>> <a href="mailto:jboss-as7-dev@lists.jboss.org">jboss-as7-dev@lists.jboss.org</a> <mailto:<a href="mailto:jboss-as7-dev@lists.jboss.org">jboss-as7-dev@lists.jboss.org</a>><br>
>> <a href="https://lists.jboss.org/mailman/listinfo/jboss-as7-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/jboss-as7-dev</a><br>
<div class="im HOEnZb">>><br>
>><br>
><br>
><br>
><br>
> _______________________________________________<br>
> jboss-as7-dev mailing list<br>
> <a href="mailto:jboss-as7-dev@lists.jboss.org">jboss-as7-dev@lists.jboss.org</a><br>
> <a href="https://lists.jboss.org/mailman/listinfo/jboss-as7-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/jboss-as7-dev</a><br>
><br>
<br>
<br>
</div><span class="HOEnZb"><font color="#888888">--<br>
Brian Stansberry<br>
Principal Software Engineer<br>
JBoss by Red Hat<br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
jboss-as7-dev mailing list<br>
<a href="mailto:jboss-as7-dev@lists.jboss.org">jboss-as7-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/jboss-as7-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/jboss-as7-dev</a><br>
</div></div></blockquote></div><br>