Advanced Eap7 Cheat Sheet r2v1
Advanced Eap7 Cheat Sheet r2v1
Red Hat JBoss Enterprise Application Platform 7 (JBoss EAP) is a Java EE 7-certified
application platform. It is built on a collection of open source technologies, including an
embeddable web server, messaging, clustering and high availability, and caching. It can
be a single standalone server or have multiple defined domains, with a master server for
centralized management, profiles to define configuration, and hosted servers for scale.
Using the command-line tool
Basic Management
1
shutdown Stop an EAP standalone or domain
controller running in the background.
shutdown --restart=true
shutdown --restart=true
Socket bindings
A socket binding associates an EAP interface with a defined port. Since there are a
variety of different ports used by a single EAP server, that collection of socket bindings
is a socket binding group. For managed servers -- where multiple servers may be on the
same host or using the same configuration -- port offsets are used to ensure unique port
assignments for each server while still using the same socket binding group configuration;
the offset adds a defined number to each port number in the socket binding group and
uses the new port numbers for the managed server.
2
/socket-binding-group=new- Create a socket binding group.
sockets:add(default-interface=public)
Logging
/subsystem=logging/logger=CATEGORY:add-
handler(name=PERIODIC_HANDLER_NAME)
3
/subsystem=logging/ Enable transaction logging.
logger=com.arjuna:write-
attribute(name=level,value=VALUE)
JVM settings
The default JVM settings are defined in the standalone.conf or domain.conf file for the
app server. These settings can be configured directly in the configuration file or using the
command-line tools.
JAVA_OPTS="-Xms64m -Xmx512m Set the default heap settings in the
-XX:MaxMetaspaceSize=256m
configuration file.
-Djava.net.preferIPv4Stack=true"JAVA_
OPTS="$JAVA_OPTS
-Djboss.modules.system.pkgs=$JBOSS_
MODULES_SYSTEM_PKGS
-Djava.awt.headless=true"
4
Security and role-based access control
5
/core-service=management/ Show the role mappings for a given role.
access=authorization/
role-mapping=ROLENAME:read-
resource(recursive=true)
{
"outcome" => "success",
"result" => {
"include-all" => false,
"exclude" => undefined,
"include" => {
"user-theboss" => {
"name" => "theboss",
"realm" => undefined,
"type" => "USER"
},
"user-harold" => {
"name" => "harold",
"realm" => undefined,
"type" => "USER"
},
"group-SysOps" => {
"name" => "SysOps",
"realm" => undefined,
"type" => "GROUP"
}
}
}
}
Class loading
Classes are defined through modules. The classes available to deployments are loaded
by explicitly defining what modules and dependencies are required. There are two
types of modules: static and dynamic. Static modules are in the modules/ directory in
the app server. All APIs, including the Java EE APIs, are included as static modules.
Dynamic modules are loaded by the app server for each JAR or WAR deployment or EAR
subdeployment. These dynamic modules can define dependencies on other modules and
can themselves be defined as dependencies.
Transactions
6
/subsystem=logging/ Set the transaction log level for a
logger=com.arjuna:write-
standalone server.
attribute(name=level,value=VALUE)
reload
Datasources
/profile=PROFILE_NAME
/subsystem=datasources/jdbc-
driver=DRIVER_NAME:add(driver-
name=DRIVER_NAME,driver-module-
name=MODULE_NAME,driver-xa-datasource-
class-name=XA_DATASOURCE_CLASS_NAME,
driver-class-name=DRIVER_CLASS_NAME)
7
data-source add Add a new non-XA datasource. For a
--name=DATASOURCE_NAME
managed domain, also specify the profile
--jndi-name=JNDI_NAME
--driver-name=DRIVER_NAME with which to use the datasource.
--connection-url=CONNECTION_URL
--profile=PROFILE_NAME
@JBoss
http://middlewareblog.redhat.com