Features of the CLI
The CLI offers you some neat features such as executing operations as an atomic operation - which is called batch mode - scripting all the commands into a file (commonly named .cli
files), and also the opportunity to do configuration tasks offline, which means without a running JBoss EAP instance... or better, there is one, but it's embedded into the CLI and it's not invisible outside.
Let's start gradually.
Batch mode
Batch mode allows you to run multiple CLI commands and operations in sequence, and commit the whole set of statements as one. The all-or-nothing commit pattern is applied, which means that all tasks must run successfully in order to complete correctly, otherwise if just one task goes in error, the whole batch sequence rolls back.
To enable batch mode, first you need to invoke the batch
directive, since all future commands and operations will not be executed until you invoke the end of the batch sequence by invoking the run-batch
command.
Suppose...