Skip to end of metadata
Go to start of metadata

Properties

Adding, reading and removing system property using CLI

For standalone mode:

For domain mode the same commands are used, you can add/read/remove system properties for:
All hosts and server instances in domain

Host and its server instances

Just one server instance

Overview of all system properties

Overview of all system properties in JBoss AS7+ including OS system properties and properties specified on command line using -D, -P or --properties arguments.

Standalone

Domain

Configuration

List Subsystems

List description of available attributes and childs

Descriptions, possible attribute type and values, permission and whether expressions ( ${ ... } ) are allowed from the underlying model are shown by the read-resource-description comand.

View configuration as XML for domain model or host model

Assume you have a host that is called master

Just for the domain or standalone

Take a snapshot of what the current domain is

Take the latest snapshot of the host.xml for a particular host

Assume you have a host that is called master

How to get interface address

The attribute for interface is named "resolved-address". It's a runtime attribute so it does not show up in :read-resource by default. You have to add the "include-runtime" parameter.

It's similar for domain, just specify path to server instance:

Remove Default Datasource and Driver

Add a New JDBC Driver

Add a New Datasource

Add a New XA Datasource

Add a String Value into JNDI

This value can then be looked up in code:

Define a Security Domain Using a Database User Store, Howto Avoid a Full Server Reload Requests

This example shows usage of the operational header allow-resource-service-restart, which can be used in some cases to prevent server reload requests.

Scripted Configuration

Sample CLI configuration script

demo.cli

Execution of configuration script

Runtime

Get all configuration and runtime details from CLI

Add a log category

Toggle root logger level during runtime with out bouncing the server

In the development environment, on a running instance of JBoss, it is often desirable to turn up the level of the logs. For example, I have an application which would spit out
mega bytes of debug log statements if I had started the JBoss container with log level DEBUG. So for me, I would start the JBoss container with the default
log level (I believe the default is INFO). Then, as I am navigating the web application via the browser, I would come to a point where I would like to
turn up the verbosity of the log statements. So just before clicking on that link or button on the web page, I would open up a Terminal console and fire
up the jboss cli and modify the root-logger's log level to be DEBUG. Then, come back to the web page and click that link or button. And now, when one
views the server logs, there would be tons and tons of DEBUG statements.

In a production environment, this might be helpful when one needs more verbose logging for a short period of time. Then, when one is done collecting the log statements, one can then
switch the log level back to info. All the while the JBoss container does not need to be bounced.

1. On a freshly installed and running instance of jboss 7.1.1.Final, one would see the following when issuing a command to see the attribute
root-logger. The attribute 'root-logger' has not yet been defined.

2. Issue the command 'change-root-log-level' to modify the root logger to be of level DEBUG.

3. Now, when one re-issues the read-attribute command on 'root-logger', it is defined and the level is displayed.

Scripting

Windows and "Press any key to continue ..." issue

AS7 scripts for Windows end with "Press any key to continue ...". This behavior is useful when script is executed by double clicking the script but not when you need to invoke several commands from custom script (e.g. 'bin/jboss-admin.bat --connect command=:shutdown').

To avoid "Press any key to continue ..." message you need to specify NOPAUSE variable. Call 'set NOPAUSE=true' in command line before running any AS7 .bat script or include it in your custom script before invoking scripts from AS7.

Statistics

Read statistics of active datasources

or

Labels:
as7 as7 Delete
jboss jboss Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.