[jboss-as7-dev] CLI parsing of complex params

Brian Stansberry brian.stansberry at redhat.com
Tue Mar 8 12:55:15 EST 2011


I find myself using the CLI a lot for quick testing, so I'm trying out 
some fairly complex operations.

This one doesn't work:

[~] 
:composite(steps=[{"operation"=>"add-system-property","name"=>"test","value"="newValue"},{"operation"=>"add-system-property","name"=>"test2","value"=>"test2"}])
Argument name '"name"' is not a valid identifier or the format is wrong 
for the argument list.

This one does, so I know the ability to create a dmr ModelNode from a 
param value is still there.

[~] :add-namespace(namespace={"test"=>"test"})
{
     "outcome" => "success",
     "result" => undefined,
     "compensating-operation" => {
         "operation" => "remove-namespace",
         "address" => [],
         "namespace" => "test"
     }
}

I think the issue is the parser is searching for indexOf(',') as the way 
to decide the end of a parameter name/value pair. It's probably going to 
need to be more of a state-machine kind of thing where chars are read 
one at a time and trigger state transitions.

-- 
Brian Stansberry
Principal Software Engineer
JBoss by Red Hat



More information about the jboss-as7-dev mailing list