<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
JBoss AS7: How Do I?
</h3>
<span style="margin-bottom: 10px;">
modified by <a href="http://community.jboss.org/people/rsvoboda">Rostislav Svoboda</a> in <i>JBoss AS7 Development</i> - <a href="http://community.jboss.org/docs/DOC-17182">View the full document</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><h1>General Questions</h1><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><h2>How do I set system properties?</h2><p><a class="jive-link-wiki-small" href="http://community.jboss.org/docs/DOC-17157">http://community.jboss.org/wiki/JBossAS7SystemProperties</a></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><h2>How can I list all system properties?</h2><p><a class="" href="http://community.jboss.org/docs/DOC-17291">http://community.jboss.org/wiki/JBossAS7OverviewOfAllSystemProperties</a></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><h2>How do I change logging levels?</h2><p><a class="jive-link-wiki-small" href="http://community.jboss.org/docs/DOC-16648">http://community.jboss.org/wiki/JBossAS7Logging</a></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><h2></h2><h2>Desktop SSO/Kerberos/Active Directory SSO/SPNego?</h2><p><a class="jive-link-wiki-small" href="http://community.jboss.org/docs/DOC-16876">http://community.jboss.org/wiki/DRAFTUsingJBossNegotiationOnAS7</a></p><h2></h2><h1>Command Line Interface (CLI)</h1><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>More information on using the CLI is at <a class="jive-link-external-small" href="https://docs.jboss.org/author/display/AS7/Management+Clients">https://docs.jboss.org/author/display/AS7/Management+Clients</a></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><h2>I want to take a snapshot of what the current domain is</h2><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>You will have to use the CLI</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><pre class="jive-pre"><code class="jive-code">bin$ ./jboss-admin.sh
You are disconnected at the moment. Type 'connect' to connect to the server or 'help' for the list of supported commands.
[disconnected /] connect
Connected to domain controller at localhost:9999
[domain@localhost:9999 /] :take-snapshot()
{
    "outcome" => "success",
    "result" => {
        "domain-results" => {"step-1" => {"name" => "/home/anil/as7/jboss-as/build/target/jboss-as-7.1.0.Alpha1-SNAPSHOT/domain/configuration/domain_xml_history/snapshot/20110908-165222603domain.xml"}},
        "server-operations" => undefined
    }
}
[domain@localhost:9999 /] help
For a list of commands available in the current context execute
help --commands
The resulting listing may depend on the current context. I.g. some of the commands
require an established connection to a controller (standalone or domain).
These commands won't appear in the listing unless the connection has been established.
Here are some of the most common supported commands:
cn (or cd)                - change the current node path to the argument;
connect                - connect to the specified host and port;
deploy                    - deploy an application;
help (or h)            - print this message;
history                - print or disable/enable/clear the history expansion.
ls                        - list the contents of the node path;
pwn (or pwd)            - prints the current working node;
quit (or q)            - quit the command line interface;
undeploy                - undeploy an application;
version                - prints the version and environment information.
add-jms-queue            - creates a new JMS queue
remove-jms-queue        - removes an existing JMS queue
add-jms-topic            - creates a new JMS topic
remove-jms-topic        - removes an existing JMS topic
add-jms-cf                - creates a new JMS connection factory
remove-jms-cf            - removes an existing JMS connection factory
data-source            - allows to add new, modify and remove existing data sources
xa-data-source            - allows to add new, modify and remove existing XA data sources
For a more detailed description of a specific command, execute the command with '--help' as the argument.
Tab-completion is supported for the commands, just press the tab key to start.
To use tab completion for operations requests start with './' or '/' and press the tab key
which will list the available node types or names.
If the operation request doesn't require a node path then start with ':' and press the tab key
('/:' and './:' are also possible).
Operation requests are expected to follow the format:
[node-type=node-name (, node-type=node-name)*] : operation-name ['('[name=value [, name=value]*]')']
e.g. /subsystem=web/connector=http:read-attribute(name=protocol)
Whitespaces between the separators are insignificant.
If the operation doesn't require arguments then the brackets '()' are optional.
Tab-completion for operation requests supports node types and names, operation names and the property names.
[domain@localhost:9999 /]
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><h2></h2><h2>I want to take the latest snapshot of the host.xml for a particular host</h2><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Assume your host is called "master"</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><pre class="jive-pre"><code class="jive-code">/bin$ ./jboss-admin.sh
You are disconnected at the moment. Type 'connect' to connect to the server or 'help' for the list of supported commands.
[disconnected /] connect
Connected to domain controller at localhost:9999
[domain@localhost:9999 /]  /host=master:take-snapshot
{
    "outcome" => "success",
    "result" => {
        "domain-results" => {"step-1" => {"name" => "/home/anil/as7/jboss-as/build/target/jboss-as-7.1.0.Alpha1-SNAPSHOT/domain/configuration/host_xml_history/snapshot/20110908-165640215host.xml"}},
        "server-operations" => undefined
    }
}
[domain@localhost:9999 /]
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><h2></h2><h2>I want to write the domain model or host model to the Command Line</h2><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Assume you have a host that is called master</p><pre class="jive-pre"><code class="jive-code">[domain@localhost:9999 /] /host=master:read-config-as-xml
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Just for the domain</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><pre class="jive-pre"><code class="jive-code">[domain@localhost:9999 /] :read-config-as-xml
</code></pre></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Comment by <a href="http://community.jboss.org/docs/DOC-17182">going to Community</a></p>
        <p style="margin: 0;">Create a new document in JBoss AS7 Development at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=102&containerType=14&container=2225">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>