- To restart a specif Managed Server in a Domain
./jboss-cli.sh --connect --controller=10.25.236.195:9999 --user <admin user> --password <admin pwd>
/host=136-slave/server-config=srv-163:start(blocking=true)
/host=136-slave/server-config=srv-163:stop(blocking=true)
./jboss-cli.sh --connect --controller=10.25.236.195:9999 --command='/host=136-slave/server-config=srv-163:stop(blocking=true)'
{
"outcome" => "success",
"result" => "STOPPED"
}
- to change Logging level
#for all modules
# standalone
/subsystem=logging/root-logger=ROOT/:write-attribute(name=level,value=NEW_LOGGING_LEVEL)
# domain
/profile=Profile_Name/subsystem=logging/root-logger=ROOT:change-root-log-level(level=NEW_LOGGING_LEVEL)
# for a specific pkg
/subsystem=logging/logger=package.name/:add(category=package.name,level=INFO,use-parent-handlers=true)
# level
/subsystem=logging/logger=package.name:change-log-level(level=NEW_LOGGING_LEVEL)
- to add a new simple
module
module add --name=com.mysql --resources=/home/rsoares/dev/lib/jdbc/mysql-connector-java-5.1.31/mysql-connector-java-5.1.31-bin.jar --dependencies=javax.api,javax.transaction.api,javax.servlet.api
# on EAP >= 7.1
module add --name=com.mysql --resources=/path/to/mysql-connector-java-5.1.36-bin.jar --export-dependencies=javax.api,javax.transaction.api
module add --module-root-dir=/path/to/my-external-modules/ --name=com.mysql --resources=/path/to/mysql-connector-java-5.1.36-bin.jar --dependencies=javax.api,javax.transaction.api
- to add a new jdbc drive
/subsystem=datasources/jdbc-driver=mysql:add(driver-name=mysql,driver-module-name=com.mysql,driver-xa-datasource-class-name=com.mysql.jdbc.jdbc2.optional.MysqlXADataSource,driver-class-name=com.mysql.jdbc.Driver)
- Oracle JDBC Driver example
module add --name=com.oracle --resources=/Users/rsoares/dev/lib/jdbc/ojdbc7_g.jar --dependencies=javax.api,javax.transaction.api
/subsystem=datasources/jdbc-driver=oracle/:add(driver-name=oracle,driver-module-name=com.oracle,jdbc-compliant=true,driver-datasource-class-name=oracle.jdbc.OracleDriver,xa-datasource-class=oracle.jdbc.xa.client.OracleXADataSource)
data-source add --name=SefazPool --jndi-name=java:jboss/datasources/SefazPool --connection-url="jdbc:oracle:thin:@10.1.192.181:1521:HMLBDSEF" --driver-name=oracle
data-source --name=SefazPool test-connection-in-pool
- to add JVM Options on a server-group
/server-group=other-server-group/jvm=default:write-attribute(name=jvm-options,value=["-verbose:gc", "-Xloggc:gc_%p_%t.log", "-XX:+UseGCLogFileRotation", "-XX:NumberOfGCLogFiles=10", "-XX:GCLogFileSize=50M","-XX:+PrintGCDetails", "-XX:+PrintGCDateStamps", "-XX:+PrintGCApplicationStoppedTime"])
- to add a new Management Interface on HCs
/host=136-slave/core-service=management/management-interface=http-interface:add(console-enabled=false, interface=management, port="${jboss.management.http.port:9990}", security-realm=ManagementRealm)
/host=136-slave:reload(restart-servers=false
Logging rotate:
I got the answer to my question here: https://access.redhat.com/solutions/412673 I have amended the properties as follows: handler.BOOT_FILE.properties=autoFlush,append,fileName,suffix and have added the following line handler.BOOT_FILE.append=true
- SUPPORT FOR DISPLAYING AND SAVING ATTACHMENTS
attachment save --operation=/subsystem=logging/log-file=server.log:read-attribute(name=stream) --file=test
attachment display --operation=/subsystem=logging/log-file=server.log:read-attribute(name=stream)
- SUPPORT FOR ATTACHING FILES
/deployment=test:add-content(content=[{input-stream-index=C:/a.txt,target-path=a.txt}])
- VIEW WORKER (former thread pools) runtime statistics
/subsystem=io/worker=default:read-resource(include-runtime=true,recursive=true)