Markus Locher [
https://community.jboss.org/people/askkeller] commented on the document
"JBoss AS7 System Properties"
To view all comments on this document, visit:
https://community.jboss.org/docs/DOC-17157#comment-11841
--------------------------------------------------
Hi,
when I use the above commands I can create a property called "*foo.bar*" with
value "bar". I can successfully read this:
./jboss-cli.sh --controller=host:9999 --connect --gui --user=jboss
--password=pwd --command=/system-property=foo.bar:read-resource
{
"outcome" => "success",
*"result" => {"value" => "bar"}*
}
... and it shows up in the overview of properties:
..
--command="/core-service=platform-mbean/type=runtime:read-attribute(name=system-properties)"
{
"outcome" => "success",
"result" => {
"[Standalone]" => "",
"catalina.home" => "/opt/services/jboss7/standalone/tmp",
"file.encoding" => "UTF-8",
"file.encoding.pkg" => "sun.io",
"file.separator" => "/",
*"foo.bar" => "bar",*
....
"java.version" => "1.6.0_35",
....
But when I want to read the existing property "java.version" (or any other) it
gives an error:
--command=/system-property=java.version:read-resource
{
"outcome" => "failed",
"failure-description" => "JBAS014807: Management resource
'[(\"system-property\" => *\"java.version\")]' not
found",*
"rolled-back" => true
}
So, how can I read/modify existing properties?
Using: Jboss 7.1 Standalone!
Thanks
--------------------------------------------------