boskop
boskop

Reputation: 619

Export JBoss Configuration as CLI Script

Writing a cli script to configure a JBoss can be quite hard from time to time. Is it possible to modify the standalone.xml manually by an editor and then export the current configuration as cli script that after can be used to configure other systems?

Thanks,

Mike

Upvotes: 1

Views: 1570

Answers (1)

James R. Perkins
James R. Perkins

Reputation: 17780

There is not a way to do this currently. The XML is parsed and turned into management operations. CLI scripts do the same thing. They are also parsed and then turned into management operations.

The following CLI command:

/subsystem=logging/logger=org.jboss.as:add(level=TRACE)

Gets transformed into the following operatoio:

{
    "address" => [
        ("subsystem" => "logging"),
        ("logger" => "org.jboss.as")
    ],
    "operation" => "add",
    "level" => "TRACE"
}

You could execute operations like this using the API's.

That said I would think creating CLI commands should be just as easy as editing XML. Unless I guess you're editor takes the schema and allows for autocomplete. I believe you can do with the CLI GUI.

Upvotes: 1

Related Questions