[jboss-dev-forums] [JBoss AS 7 Development] - Systemt properties in operation parameter values and command arguments
Alexey Loubyansky
do-not-reply at jboss.com
Wed Jul 11 10:14:17 EDT 2012
Alexey Loubyansky [https://community.jboss.org/people/aloubyansky] created the document:
"Systemt properties in operation parameter values and command arguments"
To view the document, visit: https://community.jboss.org/docs/DOC-18726
--------------------------------------------------------------
It is allowed to pass in system properties as operation parameter and command argument values. By default, system properties will be resolved on the server side, not in the CLI JVM. Also, not every attribute in the management model supports system properties (or expressions), it depends on the specific resource and its management interface implementation.
You can change the default behaviour, though, and make the CLI resolve system properties in operation parameter and command argument values before the requests are sent to the controller. To do that, open the *jboss-cli.xml* (which is located in the server's bin directory) and set the value of *resolve-parameter-values* to *true*.
One of the use-cases when making the CLI resolve system properties is useful is when there is a CLI script file which executes a set of operations and commands parameters and arguments of which might change from one execution to another. In this case, instead of specific values operation parameters and command arguments in the file could contain system property names. And a separate properties file could define the properties. Then to run the script
./jboss-cli.sh --file=script.cli --properties=script.properties
On *Windows*, of course, the CLI launching script will be *jboss-cli.bat*.
--file argument value is a path pointing to the file containing a set of CLI operations and commands to be executed.
--properties argument value is a path pointing to the file containing property definitions referenced from the script file specified as --file argument value.
--------------------------------------------------------------
Comment by going to Community
[https://community.jboss.org/docs/DOC-18726]
Create a new document in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=102&containerType=14&container=2225]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20120711/d4e5ce95/attachment.html
More information about the jboss-dev-forums
mailing list