Configuration Guide Red Hat JBoss Enterprise Application Platform 7.4 Instructions for setting up and maintaining Red Hat JBoss Enterprise Application Platform, including running applications and services. Red Hat Customer Content Services

Commands:
EAP_HOME /bin/standalone.sh
EAP_HOME /bin/domain.sh
EAP_HOME /bin/jboss-cli.sh --connect
shutdown
EAP_HOME /bin/standalone.sh --start-mode=admin-only
:read-attribute(name=running-mode) { "outcome" => "success", "result" => "ADMIN_ONLY" }
/core-service=server-environment:read-attribute(name=initial-running-mode)
reload --start-mode=admin-only
reload --start-mode=normal
EAP_HOME /bin/domain.sh --admin-only
/host= HOST_NAME :read-attribute(name=running-mode) { "outcome" => "success", "result" => "ADMIN_ONLY" }
reload --host= HOST_NAME --admin-only=true
reload --host= HOST_NAME --admin-only=false
/subsystem=ejb3:write-attribute(name=enable-graceful-txn-shutdown,value=true)
:read-attribute(name=suspend-state)
/host=master/server=server-one:read-attribute(name=suspend-state)
:suspend(suspend-timeout=60)
:suspend-servers(suspend-timeout=60)
/host=master/server-config=server-one:suspend(suspend-timeout=60)
/server-group=main-server-group:suspend-servers(suspend-timeout=60)
/host=master:suspend-servers(suspend-timeout=60)
:resume
EAP_HOME /bin/standalone.sh --start-mode=suspend
/host= HOST_NAME /server-config= SERVER_NAME :start(start-mode=suspend)
/server-group= SERVER_GROUP_NAME :start-servers(start-mode=suspend)
shutdown --suspend-timeout=60
:stop-servers(suspend-timeout=60)
/host=master/server-config=server-one:stop(suspend-timeout=60)
/server-group=main-server-group:stop-servers(suspend-timeout=60)
/host=master:shutdown(suspend-timeout=60)
service eap7-standalone start
systemctl start eap7-standalone.service
service eap7-domain start
systemctl start eap7-domain.service
WILDFLY_SERVER_CONFIG=standalone-full.xml
WILDFLY_BIND=192.168.0.1
JAVA_OPTS="USDJAVA_OPTS -Xms2048m -Xmx2048m" JAVA_OPTS="USDJAVA_OPTS -Djboss.bind.address.management=192.168.0.1"
service eap7-standalone stop
systemctl stop eap7-standalone.service
service eap7-domain stop
systemctl stop eap7-domain.service
.\standalone.ps1 "-c=standalone-full.xml"
EAP_HOME /bin/add-user.sh
EAP_HOME /bin/add-user.sh -u 'mgmtuser1' -p 'password1!' -g 'guest,mgmtgroup'
EAP_HOME /bin/add-user.sh -u 'mgmtuser2' -p 'password1!' -sc ' /path/to /standaloneconfig/' -dc ' /path/to /domainconfig/' -up 'newname.properties'
EAP_HOME /bin/add-user.sh What type of user do you wish to add? a) Management User (mgmt-users.properties) b) Application User (application-users.properties) (a): a Enter the details of the new user to add. Using realm 'ManagementRealm' as discovered from the existing property files. Username : test-user User 'test-user' already exists and is enabled, would you like to a) Update the existing user password and roles b) Disable the existing user c) Type a new username (a):
EAP_HOME /bin/jboss-cli.sh
connect
help
deploy --help
quit
/subsystem=datasources/data-source=ExampleDS:read-attribute(name=enabled) { "outcome" => "success", "result" => true }
/profile=default/subsystem=datasources/data-source=ExampleDS:read-attribute(name=enabled)
/subsystem=datasources/data-source=ExampleDS:write-attribute(name=enabled,value=false)
/host= HOST_NAME /server-config=server-one:start
/core-service=management/management-interface=http-interface:write-attribute(name=console-enabled,value=true)
/core-service=management/management-interface=http-interface:write-attribute(name=console-enabled,value=false)
http:// HOST_NAME :9990/management/ PATH_TO_RESOURCE ?operation= OPERATION & PARAMETER = VALUE
http:// HOST_NAME :9990/management/subsystem/undertow/server/default-server/http-listener/default
http:// HOST_NAME :9990/management/subsystem/datasources/data-source/ExampleDS?operation=attribute&name=enabled
curl --digest http:// HOST_NAME :9990/management --header "Content-Type: application/json" -u USERNAME : PASSWORD -d '{"operation":"write-attribute", "address":["subsystem","datasources","data-source","ExampleDS"], "name":"enabled", "value":"false", "json.pretty":"1"}'
curl --digest http://localhost:9990/management --header "Content-Type: application/json" -u USERNAME : PASSWORD -d '{"operation":"reload"}'
{ "outcome" => "failed", "failure-description" => "WFLYCTL0458:Disallowed HTTP Header name 'Date'", "rolled-back" => true }
/core-service=management/management-interface=http-interface:write-attribute(name=constant-headers,value=[{path=" PATH_PREFIX ",headers=[{name=" HEADER_NAME ",value=" HEADER_VALUE "}]}])
reload
/core-service=management/management-interface=http-interface:write-attribute(name=constant-headers,value=[{path="/",headers=[{name="X-Help",value="http://mywebsite.com/help"}]}])
curl -s -D - -o /dev/null --digest http://localhost:9990/management/ -u USERNAME : PASSWORD
admin:redhat HTTP/1.1 200 OK Connection: keep-alive X-Frame-Options: SAMEORIGIN Content-Type: application/json; charset=utf-8 Content-Length: 3312 X-Help: http://mywebsite.com Date: Tue, 27 Oct 2020 08:13:17 GMT
/core-service=management/management-interface=http-interface:write-attribute(name=constant-headers,value=[{path= /PREFIX ,headers=[{name= X-HEADER ,value= HEADERVALUE }]}])
<management-interfaces> <http-interface security-realm="ManagementRealm"> <http-upgrade enabled="true"/> <socket-binding http="management-http"/> <constant-headers> <header-mapping path=" /PREFIX "> <header name=" X-HEADER " value=" HEADERVALUE "/> </header-mapping> </constant-headers> </http-interface> </management-interfaces>
/core-service=management/management-interface=http-interface:write-attribute(name=constant-headers,value=[{path= /PREFIX1 ,headers=[{name= X-HEADER ,value= HEADERVALUE-FOR-X }]},{path= /PREFIX2 ,headers=[{name= Y-HEADER ,value= HEADERVALUE-FOR-Y }]}])
/host=master/core-service=management/management-interface=http-interface:write-attribute(name=constant-headers,value=[{path= /PREFIX ,headers=[{name= X-HEADER ,value= HEADER-VALUE }]}])
<management-interfaces> <http-interface security-realm="ManagementRealm"> <http-upgrade enabled="true"/> <socket interface="management" port="USD{jboss.management.http.port:9990}"/> <constant-headers> <header-mapping path=" /PREFIX "> <header name=" X-HEADER " value=" HEADER-VALUE "/> </header-mapping> </constant-headers> </http-interface> </management-interfaces>
/host=master/core-service=management/management-interface=http-interface:write-attribute(name=constant-headers,value=[ {path= /PREFIX-1 ,headers=[{name= X-HEADER ,value= HEADER-VALUE-FOR-X }]},{path= /PREFIX-2 ,headers=[{name= Y-HEADER ,value= HEADER-VALUE-FOR-Y }]}])
// Create the management client ModelControllerClient client = ModelControllerClient.Factory.create("localhost", 9990); // Create the operation request ModelNode op = new ModelNode(); // Set the operation op.get("operation").set("read-resource"); // Set the address ModelNode address = op.get("address"); address.add("subsystem", "undertow"); address.add("server", "default-server"); address.add("http-listener", "default"); // Execute the operation and manipulate the result ModelNode returnVal = client.execute(op); System.out.println("Outcome: " + returnVal.get("outcome").toString()); System.out.println("Result: " + returnVal.get("result").toString()); // Close the client client.close();
EAP_HOME /bin/standalone.sh --server-config=standalone-full.xml
wildfly-configuration: subsystem: datasources: jdbc-driver: postgresql: driver-name: postgresql driver-xa-datasource-class-name: org.postgresql.xa.PGXADataSource driver-module-name: org.postgresql.jdbc data-source: PostgreSQLDS: enabled: true exception-sorter-class-name: org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLExceptionSorter jndi-name: java:jboss/datasources/PostgreSQLDS jta: true max-pool-size: 20 min-pool-size: 0 connection-url: "jdbc:postgresql://localhost:5432}/demo" driver-name: postgresql user-name: postgres password: postgres validate-on-match: true background-validation: false background-validation-millis: 10000 flush-strategy: FailingConnectionOnly statistics-enable: false stale-connection-checker-class-name: org.jboss.jca.adapters.jdbc.extensions.novendor.NullStaleConnectionChecker valid-connection-checker-class-name: org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLValidConnectionChecker transaction-isolation: TRANSACTION_READ_COMMITTED
wildfly-configuration: subsystem: logging: console-handler: CONSOLE: level: !undefine
wildfly-configuration: socket-binding-group: standard-sockets: remote-destination-outbound-socket-binding: remote-artemis: host: localhost port: 61616 subsystem: messaging-activemq: server: default: !remove remote-connector: artemis: socket-binding: remote-artemis pooled-connection-factory: RemoteConnectionFactory: connectors: - artemis entries: - "java:jboss/RemoteConnectionFactory" - "java:jboss/exported/jms/RemoteConnectionFactory" enable-amq1-prefix: false user: admin password: admin ejb3: default-resource-adapter-name: RemoteConnectionFactory ee: service: default-bindings: jms-connection-factory: "java:jboss/RemoteConnectionFactory"
wildfly-configuration: subsystem: elytron: permission-set: default-permissions: permissions: !list-add - class-name: org.wildfly.transaction.client.RemoteTransactionPermission module: org.wildfly.transaction.client target-name: "*" index: 0
./standalone.sh -y=/home/ehsavoie/dev/wildfly/config2.yml:config.yml -c standalone-full.xml
EAP_HOME /bin/domain.sh --host-config=host-master.xml
:take-snapshot { "outcome" => "success", "result" => " EAP_HOME /standalone/configuration/standalone_xml_history/snapshot/20151022-133109702standalone.xml" }
:list-snapshots { "outcome" => "success", "result" => { "directory" => " EAP_HOME /standalone/configuration/standalone_xml_history/snapshot", "names" => [ "20151022-133109702standalone.xml", "20151022-132715958standalone.xml" ] } }
:delete-snapshot(name=20151022-133109702standalone.xml)
EAP_HOME /bin/standalone.sh --server-config=standalone_xml_history/snapshot/20151022-133109702standalone.xml
/subsystem=core-management/service=configuration-changes:add(max-history=20)
/host= HOST_NAME /subsystem=core-management/service=configuration-changes:add(max-history=20)
/subsystem=core-management/service=configuration-changes:list-changes
/host= HOST_NAME /subsystem=core-management/service=configuration-changes:list-changes
/host= HOST_NAME /server= SERVER_NAME /subsystem=core-management/service=configuration-changes:list-changes
{ "outcome" => "success", "result" => [ { "operation-date" => "2016-02-12T18:37:00.354Z", "access-mechanism" => "NATIVE", "remote-address" => "127.0.0.1/127.0.0.1", "outcome" => "success", "operations" => [{ "address" => [], "operation" => "reload", "operation-headers" => { "caller-type" => "user", "access-mechanism" => "NATIVE" } }] }, { "operation-date" => "2016-02-12T18:34:16.859Z", "access-mechanism" => "NATIVE", "remote-address" => "127.0.0.1/127.0.0.1", "outcome" => "success", "operations" => [{ "address" => [ ("subsystem" => "datasources"), ("data-source" => "ExampleDS") ], "operation" => "write-attribute", "name" => "enabled", "value" => false, "operation-headers" => { "caller-type" => "user", "access-mechanism" => "NATIVE" } }] }, { "operation-date" => "2016-02-12T18:24:11.670Z", "access-mechanism" => "HTTP", "remote-address" => "127.0.0.1/127.0.0.1", "outcome" => "success", "operations" => [{ "operation" => "remove", "address" => [ ("subsystem" => "messaging-activemq"), ("server" => "default"), ("jms-queue" => "ExpiryQueue") ], "operation-headers" => {"access-mechanism" => "HTTP"} }] } ] }
<interface name="public"> <inet-address value="USD{jboss.bind.address:127.0.0.1}"/> </interface>
EAP_HOME /bin/standalone.sh -Djboss.bind.address= IP_ADDRESS
USD{ SYSTEM_VALUE_1 USD{ SYSTEM_VALUE_2 }}
<password>USD{VAULT::ds_ExampleDS::password::1}</password>
<password>USD{VAULT::USD{datasource_name}::password::1}</password>
/subsystem=ee:write-attribute(name="jboss-descriptor-property-replacement",value= VALUE )
/subsystem=ee:write-attribute(name="spec-descriptor-property-replacement",value= VALUE )
EAP_HOME /bin/standalone.sh --git-repo=local --git-branch=1.0.x
<?xml version="1.0" encoding="UTF-8"?> <configuration> <authentication-client xmlns="urn:elytron:client:1.2"> <authentication-rules> <rule use-configuration="test-login"> </rule> </authentication-rules> <authentication-configurations> <configuration name="test-login"> <sasl-mechanism-selector selector="BASIC" /> <set-user-name name="eap-user" /> <credentials> <clear-password password="my_api_key" /> </credentials> <set-mechanism-realm name="testRealm" /> </configuration> </authentication-configurations> </authentication-client> </configuration>
EAP_HOME /bin/standalone.sh --git-repo=https://github.com/ MY_GIT_ID /eap-configuration.git --git-branch=1.0.x --git-auth=file:///home/ USER_NAME /github-wildfly-config.xml --server-config=standalone-full.xml
<eap_home_path> /bin/standalone.sh --git-repo= <git_repository_url> --git-auth= <elytron_configuration_file_url>
[~/.ssh]USD ssh-keygen -t ecdsa -b 256 Generating public/private ecdsa key pair. Enter file in which to save the key (/home/user/.ssh/id_ecdsa): Enter passphrase (empty for no passphrase): secret Enter same passphrase again: secret Your identification has been saved in /home/user/.ssh/id_ecdsa. Your public key has been saved in /home/user/.ssh/id_ecdsa.pub.
<authentication-configurations> <configuration name="example"> <credentials> <key-pair> <openssh-private-key pem="-----BEGIN OPENSSH PRIVATE KEY----- b3BlbnNzaC1rZXktdjEAAAAACmFlczI1Ni1jdHIAAAAGYmNyeXB0AAAAGAAAABDaZzGpGV 922xmrL+bMHioPAAAAEAAAAAEAAABoAAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlz dHAyNTYAAABBBIMTU1m6pmpnSTZ2k/cbKnxXkRpXUmWwqN1SSNLpRswGsUhmLG2H21br1Z lEHRiRn6zQmA4YCtCw2hLuz8M8WVoAAADAQk+bMNWFfaI4Ej1AQdlLl6v4RDa2HGjDS3V4 39h0pOx4Ix7YZKydTN4SPkYRt78CNK0AhhtKsWo2lVNwyfh8/6SeqowhgCG9MJYW8yRR1R 3DX/eQTx6MV/gSSRLDTpcVWUY0jrBGpMaEvylKoNcabiEo44flkIYlG6E/YtFXsmXsoBsj nFcjvmfE7Lzyin5Fowwpbqj9f0XOARu9wsUzeyJVAwT7+YCU3mWJ3dnO1bOxK4TuLsxD6j RB7bJemsfr -----END OPENSSH PRIVATE KEY-----"> <clear-password password="secret"/> </openssh-private-key> </key-pair> </credentials> </configuration> </authentication-configurations>
<authentication-configurations> <configuration name="example"> <credentials> <ssh-credential ssh-directory="/user/home/example/.ssh" private-key-file="id_test_ecdsa" known-hosts-file="known_hosts_test"> 1 2 3 <clear-password password="secret"/> </ssh-credential> </credentials> </configuration> </authentication-configurations>
:publish-configuration(location="=https://github.com/ MY_GIT_ID /eap-configuration.git") {"outcome" => "success"}
:take-snapshot(name="snapshot-01", comment="1st snapshot") { "outcome" => "success", "result" => "1st snapshot" }
:list-snapshots { "outcome" => "success", "result" => { "directory" => "", "names" => [ "snapshot : 1st snapshot", "refs/tags/snapshot-01", "snapshot2 : 2nd snapshot", "refs/tags/snapshot-02" ] } }
:delete-snapshot(name="snapshot-01") {"outcome" => "success"}
<file relative-to="jboss.server.log.dir" path="server.log"/>
ls /path
ls /host= HOST_NAME /server= SERVER_NAME /path
/path= PATH_NAME :read-resource
/host= HOST_NAME /server= SERVER_NAME /path= PATH_NAME :read-resource
EAP_HOME /bin/standalone.sh -Djboss.server.log.dir=/var/log
JAVA_OPTS="USDJAVA_OPTS -Djboss.server.log.dir=/var/log"
EAP_HOME /bin/domain.sh -Djboss.domain.temp.dir=/opt/jboss_eap/domain_data/all_temp -Djboss.domain.log.dir=/opt/jboss_eap/domain_data/all_logs -Djboss.domain.data.dir=/opt/jboss_eap/domain_data/all_data -Djboss.domain.servers.dir=/opt/jboss_eap/domain_data/all_servers
/opt/jboss_eap/domain_data/ ├── all_data ├── all_logs ├── all_servers │ ├── server-one │ │ ├── data │ │ ├── log │ │ └── tmp │ └── server-two │ ├── data │ ├── log │ └── tmp └── all_temp
/path=my.custom.path:add(path=/my/custom/path)
<subsystem xmlns="urn:jboss:domain:logging:6.0"> <periodic-rotating-file-handler name="FILE" autoflush="true"> <formatter> <named-formatter name="PATTERN"/> </formatter> <file relative-to="my.custom.path" path="server.log"/> <suffix value=".yyyy-MM-dd"/> <append value="true"/> </periodic-rotating-file-handler> </subsystem>
EAP_HOME /domain └─ servers ├── server-one │ ├── data │ ├── tmp │ └── log └── server-two ├── data ├── tmp └── log
/host= HOST_NAME :write-attribute(name=directory-grouping,value=by-server)
<servers directory-grouping="by-server"> <server name="server-one" group="main-server-group"/> <server name="server-two" group="main-server-group" auto-start="true"> <socket-bindings port-offset="150"/> </server> </servers>
EAP_HOME /domain ├── data │ └── servers │ ├── server-one │ └── server-two ├── log │ └── servers │ ├── server-one │ └── server-two └── tmp └── servers ├── server-one └── server-two
/host= HOST_NAME :write-attribute(name=directory-grouping,value=by-type)
<servers directory-grouping="by-type"> <server name="server-one" group="main-server-group"/> <server name="server-two" group="main-server-group" auto-start="true"> <socket-bindings port-offset="150"/> </server> </servers>
<inet-address value="USD{jboss.bind.address:127.0.0.1}"/>
EAP_HOME /bin/standalone.sh -Djboss.bind.address=192.168.1.2
/system-property= PROPERTY_NAME :add(value= PROPERTY_VALUE )
/system-property=jboss.bind.address:add(value=192.168.1.2)
Set the bind address JAVA_OPTS="USDJAVA_OPTS -Djboss.bind.address=192.168.1.2"
Set the bind address JAVA_OPTS="USDJAVA_OPTS -Djboss.bind.address=192.168.1.2" The ProcessController process uses its own set of java options if [ "xUSDPROCESS_CONTROLLER_JAVA_OPTS" = "x" ]; then
<audit-log> <formatters> <json-formatter name="json-formatter"/> </formatters> <handlers> <file-handler name="file" formatter="json-formatter" path="audit-log.log" relative-to="jboss.server.data.dir"/> </handlers> <logger log-boot="true" log-read-only="false" enabled="false"> <handlers> <handler name="file"/> </handlers> </logger> </audit-log>
/core-service=management/access=audit:read-resource(recursive=true)
<audit-log> <formatters> <json-formatter name="json-formatter"/> </formatters> <handlers> <file-handler name="host-file" formatter="json-formatter" relative-to="jboss.domain.data.dir" path="audit-log.log"/> <file-handler name="server-file" formatter="json-formatter" relative-to="jboss.server.data.dir" path="audit-log.log"/> </handlers> <logger log-boot="true" log-read-only="false" enabled="false"> <handlers> <handler name="host-file"/> </handlers> </logger> <server-logger log-boot="true" log-read-only="false" enabled="false"> <handlers> <handler name="server-file"/> </handlers> </server-logger> </audit-log>
/host= HOST_NAME /core-service=management/access=audit:read-resource(recursive=true)
/core-service=management/access=audit/logger=audit-log:write-attribute(name=enabled,value=true)
/host= HOST_NAME /core-service=management/access=audit/logger=audit-log:write-attribute(name=enabled,value=true)
/host= HOST_NAME /core-service=management/access=audit/server-logger=audit-log:write-attribute(name=enabled,value=true)
/subsystem=jmx/configuration=audit-log:add() /subsystem=jmx/configuration=audit-log/handler=file:add()
/host= HOST_NAME /subsystem=jmx/configuration=audit-log:add()
/host= HOST_NAME /subsystem=jmx/configuration=audit-log/handler=host-file:add()
/profile= PROFILE_NAME /subsystem=jmx/configuration=audit-log:add()
/profile= PROFILE_NAME /subsystem=jmx/configuration=audit-log/handler=server-file:add()
batch /core-service=management/access=audit/syslog-handler= SYSLOG_HANDLER_NAME :add(formatter=json-formatter) /core-service=management/access=audit/syslog-handler= SYSLOG_HANDLER_NAME /protocol=udp:add(host= HOST_NAME ,port= PORT ) run-batch
/core-service=management/access=audit/syslog-handler= SYSLOG_HANDLER_NAME /protocol=tls/authentication=truststore:add(keystore-path= PATH_TO_TRUSTSTORE ,keystore-password= TRUSTSTORE_PASSWORD )
/core-service=management/access=audit/logger=audit-log/handler= SYSLOG_HANDLER_NAME :add
package org.simple.lifecycle.events.listener; import java.io.File; import java.io.FileWriter; import java.io.IOException; import org.wildfly.extension.core.management.client.ProcessStateListener; import org.wildfly.extension.core.management.client.ProcessStateListenerInitParameters; import org.wildfly.extension.core.management.client.RunningStateChangeEvent; import org.wildfly.extension.core.management.client.RuntimeConfigurationStateChangeEvent; public class SimpleListener implements ProcessStateListener { private File file; private FileWriter fileWriter; private ProcessStateListenerInitParameters parameters; public void init(ProcessStateListenerInitParameters parameters) { this.parameters = parameters; this.file = new File(parameters.getInitProperties().get("file")); try { fileWriter = new FileWriter(file, true); } catch (IOException e) { e.printStackTrace(); } } public void cleanup() { try { fileWriter.close(); } catch (IOException e) { e.printStackTrace(); } finally { fileWriter = null; } } public void runtimeConfigurationStateChanged(RuntimeConfigurationStateChangeEvent evt) { try { fileWriter.write(String.format("Runtime configuration state change for %s: %s to %s\n", parameters.getProcessType(), evt.getOldState(), evt.getNewState())); fileWriter.flush(); } catch (IOException e) { e.printStackTrace(); } } public void runningStateChanged(RunningStateChangeEvent evt) { try { fileWriter.write(String.format("Running state change for %s: %s to %s\n", parameters.getProcessType(), evt.getOldState(), evt.getNewState())); fileWriter.flush(); } catch (IOException e) { e.printStackTrace(); } } }
module add --name=org.simple.lifecycle.events.listener --dependencies=org.wildfly.extension.core-management-client --resources=/path/to/simple-listener-0.0.1-SNAPSHOT.jar
/subsystem=core-management/process-state-listener=my-simple-listener:add(class=org.simple.lifecycle.events.listener.SimpleListener, module=org.simple.lifecycle.events.listener,properties={file=/path/to/my-listener-output.txt})
Running state change for STANDALONE_SERVER: normal to suspending Running state change for STANDALONE_SERVER: suspending to suspended
import java.io.BufferedWriter; import java.io.IOException; import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.nio.file.StandardOpenOption; import javax.management.AttributeChangeNotification; import javax.management.Notification; import javax.management.NotificationListener; import org.jboss.logging.Logger; public class StateNotificationListener implements NotificationListener { public static final String RUNTIME_CONFIGURATION_FILENAME = "runtime-configuration-notifications.txt"; public static final String RUNNING_FILENAME = "running-notifications.txt"; private final Path targetFile; public StateNotificationListener() { this.targetFile = Paths.get("notifications/data").toAbsolutePath(); init(targetFile); } protected Path getRuntimeConfigurationTargetFile() { return this.targetFile.resolve(RUNTIME_CONFIGURATION_FILENAME); } protected Path getRunningConfigurationTargetFile() { return this.targetFile.resolve(RUNNING_FILENAME); } protected final void init(Path targetFile) { try { Files.createDirectories(targetFile); if (!Files.exists(targetFile.resolve(RUNTIME_CONFIGURATION_FILENAME))) { Files.createFile(targetFile.resolve(RUNTIME_CONFIGURATION_FILENAME)); } if (!Files.exists(targetFile.resolve(RUNNING_FILENAME))) { Files.createFile(targetFile.resolve(RUNNING_FILENAME)); } } catch (IOException ex) { Logger.getLogger(StateNotificationListener.class).error("Problem handling JMX Notification", ex); } } @Override public void handleNotification(Notification notification, Object handback) { AttributeChangeNotification attributeChangeNotification = (AttributeChangeNotification) notification; if ("RuntimeConfigurationState".equals(attributeChangeNotification.getAttributeName())) { writeNotification(attributeChangeNotification, getRuntimeConfigurationTargetFile()); } else { writeNotification(attributeChangeNotification, getRunningConfigurationTargetFile()); } } private void writeNotification(AttributeChangeNotification notification, Path path) { try (BufferedWriter in = Files.newBufferedWriter(path, StandardCharsets.UTF_8, StandardOpenOption.APPEND)) { in.write(String.format("%s %s %s %s", notification.getType(), notification.getSequenceNumber(), notification.getSource().toString(), notification.getMessage())); in.newLine(); in.flush(); } catch (IOException ex) { Logger.getLogger(StateNotificationListener.class).error("Problem handling JMX Notification", ex); } } }
MBeanServer server = ManagementFactory.getPlatformMBeanServer(); server.addNotificationListener(ObjectName.getInstance("jboss.root:type=state"), new StateNotificationListener(), null, null);
jmx.attribute.change 5 jboss.root:type=state The attribute 'RunningState' has changed from 'normal' to 'suspending' jmx.attribute.change 6 jboss.root:type=state The attribute 'RunningState' has changed from 'suspending' to 'suspended'
<interfaces> <interface name="management"> <inet-address value="USD{jboss.bind.address.management:127.0.0.1}"/> </interface> <interface name="public"> <inet-address value="USD{jboss.bind.address:127.0.0.1}"/> </interface> <interface name="private"> <inet-address value="USD{jboss.bind.address.private:127.0.0.1}"/> </interface> <interface name="unsecure"> <inet-address value="USD{jboss.bind.address.unsecure:127.0.0.1}"/> </interface> </interfaces>
EAP_HOME /bin/standalone.sh -Djboss.bind.address= IP_ADDRESS
/interface=external:add(nic=eth0)
<interface name="external"> <nic name="eth0"/> </interface>
/interface=default:add(subnet-match=192.168.0.0/16,up=true,multicast=true,not={point-to-point=true})
<interface name="default"> <subnet-match value="192.168.0.0/16"/> <up/> <multicast/> <not> <point-to-point/> </not> </interface>
/interface=public:write-attribute(name=inet-address,value="USD{jboss.bind.address:192.168.0.0}")
<interface name="public"> <inet-address value="USD{jboss.bind.address:192.168.0.0}"/> </interface>
/host= HOST_NAME /server-config= SERVER_NAME /interface= INTERFACE_NAME :add(inet-address=127.0.0.1)
<servers> <server name=" SERVER_NAME " group="main-server-group"> <interfaces> <interface name=" INTERFACE_NAME "> <inet-address value="127.0.0.1"/> </interface> </interfaces> </server> </servers>
<socket-binding-group name="standard-sockets" default-interface="public" port-offset="USD{jboss.socket.binding.port-offset:0}"> <socket-binding name="management-http" interface="management" port="USD{jboss.management.http.port:9990}"/> <socket-binding name="management-https" interface="management" port="USD{jboss.management.https.port:9993}"/> <socket-binding name="ajp" port="USD{jboss.ajp.port:8009}"/> <socket-binding name="http" port="USD{jboss.http.port:8080}"/> <socket-binding name="https" port="USD{jboss.https.port:8443}"/> <socket-binding name="txn-recovery-environment" port="4712"/> <socket-binding name="txn-status-manager" port="4713"/> <outbound-socket-binding name="mail-smtp"> <remote-destination host="localhost" port="25"/> </outbound-socket-binding> </socket-binding-group>
<socket-binding-groups> <socket-binding-group name="standard-sockets" default-interface="public"> <!-- Needed for server groups using the 'default' profile --> <socket-binding name="ajp" port="USD{jboss.ajp.port:8009}"/> <socket-binding name="http" port="USD{jboss.http.port:8080}"/> <socket-binding name="https" port="USD{jboss.https.port:8443}"/> <socket-binding name="txn-recovery-environment" port="4712"/> <socket-binding name="txn-status-manager" port="4713"/> <outbound-socket-binding name="mail-smtp"> <remote-destination host="localhost" port="25"/> </outbound-socket-binding> </socket-binding-group> <socket-binding-group name="ha-sockets" default-interface="public"> <!-- Needed for server groups using the 'ha' profile --> </socket-binding-group> <socket-binding-group name="full-sockets" default-interface="public"> <!-- Needed for server groups using the 'full' profile --> </socket-binding-group> <socket-binding-group name="full-ha-sockets" default-interface="public"> <!-- Needed for server groups using the 'full-ha' profile --> <socket-binding name="ajp" port="USD{jboss.ajp.port:8009}"/> <socket-binding name="http" port="USD{jboss.http.port:8080}"/> <socket-binding name="https" port="USD{jboss.https.port:8443}"/> <socket-binding name="iiop" interface="unsecure" port="3528"/> <socket-binding name="iiop-ssl" interface="unsecure" port="3529"/> <socket-binding name="jgroups-mping" interface="private" port="0" multicast-address="USD{jboss.default.multicast.address:230.0.0.4}" multicast-port="45700"/> <socket-binding name="jgroups-tcp" interface="private" port="7600"/> <socket-binding name="jgroups-udp" interface="private" port="55200" multicast-address="USD{jboss.default.multicast.address:230.0.0.4}" multicast-port="45688"/> <socket-binding name="modcluster" port="0" multicast-address="224.0.1.105" multicast-port="23364"/> <socket-binding name="txn-recovery-environment" port="4712"/> <socket-binding name="txn-status-manager" port="4713"/> <outbound-socket-binding name="mail-smtp"> <remote-destination host="localhost" port="25"/> </outbound-socket-binding> </socket-binding-group> <socket-binding-group name="load-balancer-sockets" default-interface="public"> <!-- Needed for server groups using the 'load-balancer' profile --> </socket-binding-group> </socket-binding-groups>
/socket-binding-group=new-sockets:add(default-interface=public)
/socket-binding-group=new-sockets/socket-binding=new-socket-binding:add(port=1234)
/socket-binding-group=new-sockets/socket-binding=new-socket-binding:write-attribute(name=interface,value=unsecure)
<socket-binding-groups> <socket-binding-group name="new-sockets" default-interface="public"> <socket-binding name="new-socket-binding" interface="unsecure" port="1234"/> </socket-binding-group> </socket-binding-groups>
/host=master/server-config=server-two/:write-attribute(name=socket-binding-port-offset,value=250)
EAP_HOME /bin/standalone.sh -Djboss.socket.binding.port-offset=100
-Djava.net.preferIPv4Stack=false
-Djava.net.preferIPv6Addresses=true
Specify options to pass to the Java VM. # if [ "xUSDJAVA_OPTS" = "x" ]; then JAVA_OPTS="-Xms1303m -Xmx1303m -Djava.net.preferIPv4Stack=false" JAVA_OPTS="USDJAVA_OPTS -Djboss.modules.system.pkgs=USDJBOSS_MODULES_SYSTEM_PKGS -Djava.awt.headless=true" JAVA_OPTS="USDJAVA_OPTS -Djava.net.preferIPv6Addresses=true" else
/interface=management:write-attribute(name=inet-address,value="USD{jboss.bind.address.management:[::1]}")
<interfaces> <interface name="management"> <inet-address value="USD{jboss.bind.address.management:[::1]}"/> </interface> . </interfaces>
<?xml version="1.0" ?> <module xmlns="urn:jboss:module:1.1" name="com.mysql"> <resources> <resource-root path="mysql-connector-java-8.0.12.jar"/> </resources> <dependencies> <module name="javaee.api"/> <module name="sun.jdk"/> <module name="ibm.jdk"/> <module name="javax.api"/> <module name="javax.transaction.api"/> </dependencies> </module>
<?xml version="1.0" ?> <module xmlns="urn:jboss:module:1.1" name="oracle.jdbc"> <resources> <resource-root path="/home/redhat/test.jar"/> </resources> </module>
cd EAP_HOME /modules/ mkdir -p com/mysql/main
cp /path/to /mysql-connector-java-8.0.12.jar EAP_HOME /modules/com/mysql/main/
<?xml version="1.0" ?> <module xmlns="urn:jboss:module:1.1" name="com.mysql"> <resources> <resource-root path="mysql-connector-java-8.0.12.jar"/> </resources> <dependencies> <module name="javaee.api"/> <module name="sun.jdk"/> <module name="ibm.jdk"/> <module name="javax.api"/> <module name="javax.transaction.api"/> </dependencies> </module>
EAP_HOME /bin/jboss-cli.sh
module add --name= MODULE_NAME --resources= PATH_TO_RESOURCE --dependencies= DEPENDENCIES
module add --name=com.mysql --resources= /path/to /mysql-connector-java-8.0.12.jar --dependencies=javaee.api,sun.jdk,ibm.jdk,javax.api,javax.transaction.api
module add --name=myprops --resources= /path/to /properties.jar
/subsystem=ee:list-add(name=global-modules,value={name=myprops})
Thread.currentThread().getContextClassLoader().getResource("my.properties");
EAP_HOME /bin/jboss-cli.sh
module remove --name= MODULE_NAME
module remove --name=com.mysql
/subsystem=ee:write-attribute(name=global-modules,value=[{name= MODULE_NAME_1 },{name= MODULE_NAME_2 }]
/subsystem=ee:list-add(name=global-modules,value={name= MODULE_NAME })
/subsystem=ee:write-attribute(name=global-modules,value=[{name=module1,services=true}]
/subsystem=ee:write-attribute(name=global-modules,value=[{name=module1,services=true},{name=module2,services=false}]
/subsystem=ee:list-add(name=global-modules,value={name=module1,services=true})
/my-common-libs/log4j2.xml /my-common-libs/libs/log4j-api-2.14.1.jar /my-common-libs/libs/log4j-core-2.14.1.jar
[standalone@localhost:9990 /] /subsystem=ee/global-directory=my-common-libs:add(path=my-common-libs, relative-to=jboss.home.dir)
[domain@localhost:9990 /] /profile=default/subsystem=ee/global-directory=my-common-libs:add(path=my-common-libs, relative-to=jboss.server.data.dir)
[standalone@localhost:9990 /] /subsystem=ee/global-directory=my-common-libs:read-resource { "outcome" => "success", "result" => { "path" => "my-common-libs", "relative-to" => "jboss.home.dir" } }
[domain@localhost:9990 /] /subsystem=ee/global-directory=my-common-libs:read-resource { "outcome" => "success", "result" => { "path" => "my-common-libs", "relative-to" => "jboss.server.data.dir" } }
[standalone@localhost:9990 /] /subsystem=ee/global-directory=my-common-libs:remove()
[domain@localhost:9990 /] /profile=default/subsystem=ee/global-directory=my-common-libs:remove()
/subsystem=ee:write-attribute(name=ear-subdeployments-isolated,value=true)
JBOSS_MODULEPATH=" /path/to /modules/directory/"
set "JBOSS_MODULEPATH /path/to /modules/directory/"
deployment. DEPLOYMENT_NAME
deployment. EAR_NAME . SUBDEPLOYMENT_NAME
EAP_HOME /bin/standalone.sh -Dorg.jboss.metadata.parser.validate=true
/system-property=org.jboss.metadata.parser.validate:add(value=true)
deployment deploy-file /path/to /test-application.war
WFLYSRV0027: Starting deployment of "test-application.war" (runtime-name: "test-application.war") WFLYUT0021: Registered web context: /test-application WFLYSRV0010: Deployed "test-application.war" (runtime-name : "test-application.war")
deployment undeploy test-application.war
WFLYUT0022: Unregistered web context: /test-application WFLYSRV0028: Stopped deployment test-application.war (runtime-name: test-application.war) in 62ms WFLYSRV0009: Undeployed "test-application.war" (runtime-name: "test-application.war")
deployment undeploy *
deployment disable test-application.war
deployment disable-all
deployment enable test-application.war
deployment enable-all
deployment info
NAME RUNTIME-NAME PERSISTENT ENABLED STATUS helloworld.war helloworld.war true true OK test-application.war test-application.war true true OK
deployment info helloworld.war
deployment deploy-file /path/to /test-application.war --all-server-groups
deployment deploy-file /path/to /test-application.war --server-groups=main-server-group,other-server-group
[Server:server-one] WFLYSRV0027: Starting deployment of "test-application.war" (runtime-name: "test-application.war") [Server:server-one] WFLYUT0021: Registered web context: /test-application [Server:server-one] WFLYSRV0010: Deployed "test-application.war" (runtime-name : "test-application.war")
deployment undeploy test-application.war --all-relevant-server-groups
[Server:server-one] WFLYUT0022: Unregistered web context: /test-application [Server:server-one] WFLYSRV0028: Stopped deployment test-application.war (runtime-name: test-application.war) in 74ms [Server:server-one] WFLYSRV0009: Undeployed "test-application.war" (runtime-name: "test-application.war")
deployment undeploy * --all-relevant-server-groups
deployment disable test-application.war --server-groups=other-server-group
deployment disable-all --server-groups=other-server-group
deployment enable test-application.war
deployment enable-all --server-groups=other-server-group
deployment info helloworld.war
NAME RUNTIME-NAME helloworld.war helloworld.war SERVER-GROUP STATE main-server-group enabled other-server-group added
deployment info --server-group=other-server-group
NAME RUNTIME-NAME STATE helloworld.war helloworld.war added test-application.war test-application.war enabled
cp /path/to /test-application.war EAP_HOME /standalone/deployments/
touch EAP_HOME /standalone/deployments/test-application.war.dodeploy
rm EAP_HOME /standalone/deployments/test-application.war.deployed
touch EAP_HOME /standalone/deployments/test-application.war.dodeploy
/subsystem=deployment-scanner/scanner=default:write-attribute(name=scan-enabled,value=false)
/subsystem=deployment-scanner/scanner=default:write-attribute(name=scan-interval,value=10000)
/subsystem=deployment-scanner/scanner=default:write-attribute(name=path,value= /path/to /deployments)
/subsystem=deployment-scanner/scanner=default:write-attribute(name=auto-deploy-exploded,value=true)
/subsystem=deployment-scanner/scanner=default:write-attribute(name=auto-deploy-zipped,value=false)
/subsystem=deployment-scanner/scanner=default:write-attribute(name=auto-deploy-xml,value=false)
/subsystem=deployment-scanner/scanner=new-scanner:add(path=new_deployment_dir,relative-to=jboss.server.base.dir,scan-interval=5000)
<plugin> <groupId>org.wildfly.plugins</groupId> <artifactId>wildfly-maven-plugin</artifactId> <version>USD{version.wildfly.maven.plugin}</version> </plugin>
mvn clean install wildfly:deploy
[INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2.981 s [INFO] Finished at: 2015-12-23T15:06:13-05:00 [INFO] Final Memory: 21M/231M [INFO] ------------------------------------------------------------------------
WFLYSRV0027: Starting deployment of "helloworld.war" (runtime-name: "helloworld.war") WFLYUT0021: Registered web context: /helloworld WFLYSRV0010: Deployed "helloworld.war" (runtime-name : "helloworld.war")
mvn wildfly:undeploy
[INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.237 s [INFO] Finished at: 2015-12-23T15:09:10-05:00 [INFO] Final Memory: 10M/183M [INFO] ------------------------------------------------------------------------
WFLYUT0022: Unregistered web context: /helloworld WFLYSRV0028: Stopped deployment helloworld.war (runtime-name: helloworld.war) in 27ms WFLYSRV0009: Undeployed "helloworld.war" (runtime-name: "helloworld.war")
<plugin> <groupId>org.wildfly.plugins</groupId> <artifactId>wildfly-maven-plugin</artifactId> <version>USD{version.wildfly.maven.plugin}</version> <configuration> <domain> <server-groups> <server-group>main-server-group</server-group> </server-groups> </domain> </configuration> </plugin>
mvn clean install wildfly:deploy
[INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 4.005 s [INFO] Finished at: 2016-09-02T14:36:17-04:00 [INFO] Final Memory: 21M/226M [INFO] ------------------------------------------------------------------------
WFLYSRV0027: Starting deployment of "helloworld.war" (runtime-name: "helloworld.war") WFLYUT0021: Registered web context: /helloworld WFLYSRV0010: Deployed "helloworld.war" (runtime-name : "helloworld.war")
mvn wildfly:undeploy
[INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.750 s [INFO] Finished at: 2016-09-02T14:45:10-04:00 [INFO] Final Memory: 10M/184M [INFO] ------------------------------------------------------------------------
WFLYUT0022: Unregistered web context: /helloworld WFLYSRV0028: Stopped deployment helloworld.war (runtime-name: helloworld.war) in 106ms WFLYSRV0009: Undeployed "helloworld.war" (runtime-name: "helloworld.war")
curl --digest -L -D - http:// HOST : PORT /management --header "Content-Type: application/json" -u USER : PASSWORD -d '{"operation" : "composite", "address" : [], "steps" : [{"operation" : "add", "address" : {"deployment" : "test-application.war"}, "content" : [{"url" : "file:/path/to/test-application.war"}]},{"operation" : "deploy", "address" : {"deployment" : "test-application.war"}}],"json.pretty":1}'
curl --digest -L -D - http:// HOST : PORT /management --header "Content-Type: application/json" -u USER : PASSWORD -d '{"operation" : "composite", "address" : [], "steps" : [{"operation" : "undeploy", "address" : {"deployment" : "test-application.war"}},{"operation" : "remove", "address" : {"deployment" : "test-application.war"}}],"json.pretty":1}'
curl --digest -L -D - http:// HOST : PORT /management --header "Content-Type: application/json" -u USER : PASSWORD -d '{"operation" : "add", "address" : {"deployment" : "test-application.war"}, "content" : [{"url" : "file: /path/to /test-application.war"}],"json.pretty":1}'
curl --digest -L -D - http:// HOST : PORT /management --header "Content-Type: application/json" -u USER : PASSWORD -d '{"operation" : "add", "address" : {"server-group" : "main-server-group","deployment":"test-application.war"},"json.pretty":1}'
curl --digest -L -D - http:// HOST : PORT /management --header "Content-Type: application/json" -u USER : PASSWORD -d '{"operation" : "deploy", "address" : {"server-group" : "main-server-group","deployment":"test-application.war"},"json.pretty":1}'
curl --digest -L -D - http:// HOST : PORT /management --header "Content-Type: application/json" -u USER : PASSWORD -d '{"operation" : "remove", "address" : {"server-group" : "main-server-group","deployment":"test-application.war"},"json.pretty":1}'
curl --digest -L -D - http:// HOST : PORT /management --header "Content-Type: application/json" -u USER : PASSWORD -d '{"operation" : "remove", "address" : {"deployment" : "test-application.war"}, "json.pretty":1}'
EAP_HOME /bin/standalone.sh -Djboss.server.deploy.dir= /path/to /new_deployed_content
EAP_HOME /bin/domain.sh -Djboss.domain.deployment.dir= /path/to /new_deployed_content
<jboss xmlns="urn:jboss:1.0"> <jboss-deployment-dependencies xmlns="urn:jboss:deployment-dependencies:1.0"> <dependency name="framework.ear" /> </jboss-deployment-dependencies> </jboss>
deployment-overlay add --name=new-deployment-overlay --content=WEB-INF/web.xml= /path/to /other/web.xml --deployments=test-application.war --redeploy-affected
<jboss-web xmlns="http://www.jboss.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-web_10_0.xsd" version="10.0"> <overlay>{example.path.to.overlay}</overlay> </jboss-web>
/subsystem=ee:write-attribute(name=jboss-descriptor-property-replacement,value=true)
<subsystem xmlns="urn:jboss:domain:ee:4.0"> <jboss-descriptor-property-replacement>true</jboss-descriptor-property-replacement> </subsystem>
{"my-rollout-plan" => {"rollout-plan" => { "in-series" => [ {"concurrent-groups" => { "group-A" => { "max-failure-percentage" => "20", "rolling-to-servers" => "true" }, "group-B" => undefined }}, {"server-group" => {"group-C" => { "rolling-to-servers" => "false", "max-failed-servers" => "1" }}}, {"concurrent-groups" => { "group-D" => { "max-failure-percentage" => "20", "rolling-to-servers" => "true" }, "group-E" => undefined }} ], "rollback-across-groups" => "true" }}}
rollout (id= PLAN_NAME | SERVER_GROUP_LIST ) [rollback-across-groups]
deploy /path/to /test-application.war --server-groups=main-server-group --headers={rollout main-server-group(rolling-to-servers=true)}
rollout-plan add --name=my-rollout-plan --content={rollout main-server-group(rolling-to-servers=false,max-failed-servers=1),other-server-group(rolling-to-servers=true,max-failure-percentage=20) rollback-across-groups=true}
"rollout-plan" => { "in-series" => [ {"server-group" => {"main-server-group" => { "rolling-to-servers" => false, "max-failed-servers" => 1 }}}, {"server-group" => {"other-server-group" => { "rolling-to-servers" => true, "max-failure-percentage" => 20 }}} ], "rollback-across-groups" => true }
deploy /path/to /test-application.war --all-server-groups --headers={rollout id=my-rollout-plan}
rollout-plan remove --name=my-rollout-plan
/deployment= DEPLOYMENT_NAME .war:add(content=[{empty=true}])
/deployment= ARCHIVE_DEPLOYMENT_NAME .ear:explode
/deployment= DEPLOYMENT_NAME .war:add-content(content=[{target-path= /path/to/FILE_IN_DEPLOYMENT , input-stream-index= /path/to/LOCAL_FILE_TO_UPLOAD }]
/deployment= DEPLOYMENT_NAME .war:remove-content(paths=[ /path/to/FILE_1 , /path/to/FILE_2 ])
/deployment=helloworld.war:browse-content(path=META-INF/)
{ "outcome" => "success", "result" => [ { "path" => "MANIFEST.MF", "directory" => false, "file-size" => 827L }, { "path" => "maven/org.jboss.eap.quickstarts/helloworld/pom.properties", "directory" => false, "file-size" => 106L }, { "path" => "maven/org.jboss.eap.quickstarts/helloworld/pom.xml", "directory" => false, "file-size" => 2713L }, { "path" => "maven/org.jboss.eap.quickstarts/helloworld/", "directory" => true }, { "path" => "maven/org.jboss.eap.quickstarts/", "directory" => true }, { "path" => "maven/", "directory" => true }, { "path" => "INDEX.LIST", "directory" => false, "file-size" => 251L } ] }
/deployment=helloworld.war:read-content(path=META-INF/MANIFEST.MF)
{ "outcome" => "success", "result" => {"uuid" => "24ba8e06-21bd-4505-b4d4-bdfb16451b95"}, "response-headers" => {"attached-streams" => [{ "uuid" => "24ba8e06-21bd-4505-b4d4-bdfb16451b95", "mime-type" => "text/plain" }]} }
attachment display --operation=/deployment=helloworld.war:read-content(path=META-INF/MANIFEST.MF)
ATTACHMENT 8af87836-2abd-423a-8e44-e731cc57bd80: Manifest-Version: 1.0 Implementation-Title: Quickstart: helloworld Implementation-Version: 7.4.0.GA Java-Version: 1.8.0_131 Built-By: username Scm-Connection: scm:git:git@github.com:jboss/jboss-parent-pom.git/quic kstart-parent/helloworld Specification-Vendor: JBoss by Red Hat
attachment save --operation=/deployment=helloworld.war:read-content(path=META-INF/MANIFEST.MF) --file= /path/to /MANIFEST.MF
/profile= PROFILE_NAME /subsystem= SUBSYSTEM_NAME :read-resource(recursive=true)
/subsystem=datasources/data-source=ExampleDS:read-resource
/profile=default/subsystem=datasources/data-source=ExampleDS:read-resource
/host= HOST_NAME /server= SERVER_NAME :read-resource
/host= HOST_NAME /server-config= SERVER_NAME :write-attribute(name= ATTRIBUTE_NAME ,value= VALUE )
/server-group= SERVER_GROUP_NAME :read-resource
EAP_HOME /bin/domain.sh --host-config=host-master.xml
EAP_HOME /bin/domain.sh --host-config=host-slave.xml
<domain-controller> <local/> </domain-controller>
<management-interfaces> <http-interface security-realm="ManagementRealm" http-upgrade-enabled="true"> <socket interface="management" port="USD{jboss.management.http.port:9990}"/> </http-interface> </management-interfaces>
<domain-controller> <remote security-realm="ManagementRealm"> <discovery-options> <static-discovery name="primary" protocol="USD{jboss.domain.master.protocol:remote}" host="USD{jboss.domain.master.address}" port="USD{jboss.domain.master.port:9990}"/> </discovery-options> </remote> </domain-controller>
EAP_HOME /bin/domain.sh --host-config=host-slave.xml -Djboss.domain.master.address= IP_ADDRESS
<host xmlns="urn:jboss:domain:8.0" name="host1">
EAP_HOME /bin/domain.sh --host-config=host-slave.xml
EAP_HOME /bin/jboss-cli.sh --connect --controller= DOMAIN_CONTROLLER_IP_ADDRESS
/host= EXISTING_HOST_NAME :write-attribute(name=name,value= NEW_HOST_NAME )
<host name=" NEW_HOST_NAME " xmlns="urn:jboss:domain:8.0">
reload --host= EXISTING_HOST_NAME
EAP_HOME /bin/domain.sh --host-config=host-slave.xml -Djboss.host.name= HOST_NAME
<server-group name="main-server-group" profile="full"> <jvm name="default"> <heap size="64m" max-size="512m"/> </jvm> <socket-binding-group ref="full-sockets"/> <deployments> <deployment name="test-application.war" runtime-name="test-application.war"/> <deployment name="helloworld.war" runtime-name="helloworld.war" enabled="false"/> </deployments> </server-group>
/server-group= SERVER_GROUP_NAME :add(profile= PROFILE_NAME ,socket-binding-group= SOCKET_BINDING_GROUP_NAME )
/server-group= SERVER_GROUP_NAME :write-attribute(name= ATTRIBUTE_NAME ,value= VALUE )
/server-group= SERVER_GROUP_NAME :remove
<servers> <server name="server-one" group="main-server-group"> </server> <server name="server-two" group="main-server-group" auto-start="true"> <socket-bindings port-offset="150"/> </server> <server name="server-three" group="other-server-group" auto-start="false"> <socket-bindings port-offset="250"/> </server> </servers>
/host= HOST_NAME /server-config= SERVER_NAME :add(group= SERVER_GROUP_NAME )
/host= HOST_NAME /server-config= SERVER_NAME :write-attribute(name= ATTRIBUTE_NAME ,value= VALUE )
/host= HOST_NAME /server-config= SERVER_NAME :remove
/host= HOST_NAME /server-config= SERVER_NAME :start
/server-group= SERVER_GROUP_NAME :start-servers
/host= HOST_NAME /server-config= SERVER_NAME :stop
/server-group= SERVER_GROUP_NAME :stop-servers
/host= HOST_NAME /server-config= SERVER_NAME :reload
/server-group= SERVER_GROUP_NAME :reload-servers
/server-group= SERVER_GROUP_NAME :kill-servers
<domain-controller> <remote security-realm="ManagementRealm"> <discovery-options> <static-discovery name="primary" protocol="USD{jboss.domain.master.protocol:remote}" host="172.16.81.100" port="USD{jboss.domain.master.port:9990}"/> <static-discovery name="backup" protocol="USD{jboss.domain.master.protocol:remote}" host="172.16.81.101" port="USD{jboss.domain.master.port:9990}"/> </discovery-options> </remote> </domain-controller>
EAP_HOME /bin/domain.sh --host-config=host-slave.xml --cached-dc
EAP_HOME /bin/domain.sh --host-config=host-slave.xml --backup
<domain-controller> <remote username="USDlocal" security-realm="ManagementRealm" ignore-unused-configuration="false"> <discovery-options> </discovery-options> </remote> </domain-controller>
/host=backup:write-attribute(name=domain-controller.local, value={})
reload --host= HOST_NAME
cp -r EAP_HOME /domain /path/to /domain1
cp -r EAP_HOME /domain /path/to /host1
EAP_HOME /bin/domain.sh --host-config=host-master.xml -Djboss.domain.base.dir= /path/to /domain1
EAP_HOME /bin/domain.sh --host-config=host-slave.xml -Djboss.domain.base.dir= /path/to /host1 -Djboss.domain.master.address= IP_ADDRESS -Djboss.management.http.port= PORT
<secret value=" SECRET_VALUE " />
EAP_HOME /bin/domain.sh --host-config=host-master.xml -Djboss.bind.address.management= IP1
<host xmlns="urn:jboss:domain:8.0" name=" HOST_NAME "> <management> <security-realms> <security-realm name="ManagementRealm"> <server-identities> <secret value=" SECRET_VALUE " /> </server-identities>
EAP_HOME /bin/domain.sh --host-config=host-slave.xml -Djboss.domain.master.address= IP1 -Djboss.bind.address= IP2
EAP_HOME /bin/jboss-cli.sh --connect --controller= IP1
<profiles> <profile name="eap6-default"> </profile> </profiles>
<extensions> <extension module="org.jboss.as.configadmin"/> <extension module="org.jboss.as.threads"/> <extension module="org.jboss.as.web"/> <extensions>
<socket-binding-groups> <socket-binding-group name="eap6-standard-sockets" default-interface="public"> </socket-binding-group> </socket-binding-groups>
<server-groups> <server-group name="eap6-main-server-group" profile="eap6-default"> <socket-binding-group ref="eap6-standard-sockets"/> </server-group> </server-groups>
/profile=eap6-default/subsystem=bean-validation:remove
/profile=eap6-default/subsystem=weld:write-attribute(name=require-bean-descriptor,value=true) /profile=eap6-default/subsystem=weld:write-attribute(name=non-portable-mode,value=true)
/profile=eap6-default/subsystem=datasources/data-source=ExampleDS:write-attribute(name=statistics-enabled,value=true)
<servers> <server name="server-one" group="eap6-main-server-group"/> <server name="server-two" group="eap6-main-server-group"> <socket-bindings port-offset="150"/> </server> </servers>
/host-exclude=EAP64z:write-attribute(name=active-server-groups,value=[eap6-main-server-group])
<profiles> <profile name="eap73-default"> </profile> </profiles>
<socket-binding-groups> <socket-binding-group name="eap73-standard-sockets" default-interface="public"> </socket-binding-group> </socket-binding-groups>
<server-groups> <server-group name="eap73-main-server-group" profile="eap73-default"> <socket-binding-group ref="eap73-standard-sockets"/> </server-group> </server-groups>
<servers> <server name="server-one" group="eap73-main-server-group"/> <server name="server-two" group="eap73-main-server-group"> <socket-bindings port-offset="150"/> </server> </servers>
<domain-controller> <remote security-realm="ManagementRealm" ignore-unused-configuration="true"> <discovery-options> <static-discovery name="primary" protocol="USD{jboss.domain.master.protocol:remote}" host="USD{jboss.domain.master.address}" port="USD{jboss.domain.master.port:9990}"/> </discovery-options> </remote> </domain-controller>
/profile=full-ha:clone(to-profile=cloned-profile)
/profile=new-profile:list-add(name=includes, value= PROFILE_NAME )
export JAVA_OPTS="-Xmx1024M"
set JAVA_OPTS="Xmx1024M"
EAP_HOME/bin/standalone.sh -Dmyproperty=value
/host= HOST_NAME /jvm=production_jvm:add(heap-size=2048m, max-heap-size=2048m, max-permgen-size=512m, stack-size=1024k, jvm-options=["-XX:-UseParallelGC"])
/server-group=groupA:add(profile=default, socket-binding-group=standard-sockets) /server-group=groupA/jvm=production_jvm:add
/server-group=groupA/jvm=production_jvm:write-attribute(name=heap-size,value="1024m")
/host= HOST_NAME /server-config=server-one/jvm=default:add
/host= HOST_NAME /server-config=server-one/jvm=default:write-attribute(name=heap-size,value="1024m")
/socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=my-smtp:add(host=localhost, port=25)
/subsystem=mail/mail-session=mySession:add(jndi-name=java:jboss/mail/MySession)
/subsystem=mail/mail-session=mySession/server=smtp:add(outbound-socket-binding-ref=my-smtp, username=user, password=pass, tls=true)
@Resource(lookup="java:jboss/mail/MySession") private Session session;
/subsystem=mail/mail-session=mySession:add(jndi-name=java:jboss/mail/MySession)
/socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=my-smtp-binding:add(host=localhost, port=25)
/subsystem=mail/mail-session=mySession/server=smtp:add(outbound-socket-binding-ref=my-smtp-binding, username=user, password=pass, tls=true)
/socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=my-pop3-binding:add(host=localhost, port=110) /subsystem=mail/mail-session=mySession/server=pop3:add(outbound-socket-binding-ref=my-pop3-binding, username=user, password=pass)
/socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=my-imap-binding:add(host=localhost, port=143) /subsystem=mail/mail-session=mySession/server=imap:add(outbound-socket-binding-ref=my-imap-binding, username=user, password=pass)
/subsystem=mail/mail-session=mySession/custom=myCustomServer:add(username=user,password=pass, properties={"host" => "myhost", "my-property" =>"value"})
<subsystem xmlns="urn:jboss:domain:mail:3.0"> <mail-session name="default" jndi-name="java:jboss/mail/Default"> <smtp-server outbound-socket-binding-ref="mail-smtp"/> </mail-session> <mail-session name="myMail" from="user.name@domain.org" jndi-name="java:/Mail"> <smtp-server password="password" username="user" tls="true" outbound-socket-binding-ref="mail-smtp"/> <pop3-server outbound-socket-binding-ref="mail-pop3"/> <imap-server password="password" username="nobody" outbound-socket-binding-ref="mail-imap"/> </mail-session> <mail-session name="custom" jndi-name="java:jboss/mail/Custom" debug="true"> <custom-server name="smtp" password="password" username="username"> <property name="host" value="mail.example.com"/> </custom-server> </mail-session> <mail-session name="custom2" jndi-name="java:jboss/mail/Custom2" debug="true"> <custom-server name="pop3" outbound-socket-binding-ref="mail-pop3"> <property name="custom-prop" value="some-custom-prop-value"/> </custom-server> </mail-session> </subsystem>
/subsystem=mail/mail-session=mySession/server=smtp:add(outbound-socket-binding-ref=my-smtp-binding, username=user, credential-reference={store=exampleCS, alias=mail-session-pw}, tls=true)
credential-reference={clear-text="MASK-Ewcyuqd/nP9;A1B2C3D4;351"}
2016-03-16 14:32:01,627 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC000001: Failed to start service jboss.undertow.listener.default: org.jboss.msc.service.StartException in service jboss.undertow.listener.default: Could not start http listener at org.wildfly.extension.undertow.ListenerService.start(ListenerService.java:142) at org.jboss.msc.service.ServiceControllerImplUSDStartTask.startService(ServiceControllerImpl.java:1948) at org.jboss.msc.service.ServiceControllerImplUSDStartTask.run(ServiceControllerImpl.java:1881) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutorUSDWorker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.net.BindException: Address already in use
/core-service=management:read-boot-errors
{ "outcome" => "success", "result" => [ { "failed-operation" => { "operation" => "add", "address" => [ ("subsystem" => "undertow"), ("server" => "default-server"), ("http-listener" => "default") ] }, "failure-description" => "{\"WFLYCTL0080: Failed services\" => {\"jboss.undertow.listener.default\" => \"org.jboss.msc.service.StartException in service jboss.undertow.listener.default: Could not start http listener Caused by: java.net.BindException: Address already in use\"}}", "failed-services" => {"jboss.undertow.listener.default" => "org.jboss.msc.service.StartException in service jboss.undertow.listener.default: Could not start http listener Caused by: java.net.BindException: Address already in use"} } ] }
export GC_LOG=false EAP_HOME /bin/standalone.sh
JAVA_OPTS="USDJAVA_OPTS -Duser.language=fr"
JAVA_OPTS="USDJAVA_OPTS -Duser.language=pt -Duser.country=BR"
JAVA_OPTS="USDJAVA_OPTS -Dorg.jboss.logging.locale=pt-BR"
/subsystem=logging/log-file= LOG_FILE_NAME :read-log-file
/subsystem=logging/log-file=server.log:read-log-file(lines=5,tail=false)
{ "outcome" => "success", "result" => [ "2016-03-24 08:49:26,612 INFO [org.jboss.modules] (main) JBoss Modules version 1.5.1.Final-redhat-1", "2016-03-24 08:49:26,788 INFO [org.jboss.msc] (main) JBoss MSC version 1.2.6.Final-redhat-1", "2016-03-24 08:49:26,863 INFO [org.jboss.as] (MSC service thread 1-7) WFLYSRV0049: JBoss EAP 7.0.0.GA (WildFly Core 2.0.13.Final-redhat-1) starting", "2016-03-24 08:49:27,973 INFO [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0039: Creating http management service using socket-binding (management-http)", "2016-03-24 08:49:27,994 INFO [org.xnio] (MSC service thread 1-1) XNIO version 3.3.4.Final-redhat-1" ] }
/subsystem=logging/console-handler=CONSOLE:write-attribute(name=filter-spec, value="substituteAll(\"WFLY\"\,\"YLFW\")")
/subsystem=logging:write-attribute(name=add-logging-api-dependencies, value=false)
/subsystem=logging/logger= LOG_CATEGORY :add
/subsystem=logging/logger= LOG_CATEGORY :write-attribute(name=level,value= LEVEL )
/subsystem=logging/logger= LOG_CATEGORY :write-attribute(name=use-parent-handlers,value= USE_PARENT_HANDLERS )
/subsystem=logging/logger= LOG_CATEGORY :write-attribute(name=filter-spec, value= FILTER_EXPRESSION )
/subsystem=logging/logger= LOG_CATEGORY :add-handler(name= LOG_HANDLER_NAME )
/subsystem=logging/logger= LOG_CATEGORY :remove
/subsystem=logging/console-handler= CONSOLE_HANDLER_NAME :add
/subsystem=logging/console-handler= CONSOLE_HANDLER_NAME :write-attribute(name=level,value= LEVEL )
/subsystem=logging/console-handler= CONSOLE_HANDLER_NAME :write-attribute(name=target,value= TARGET )
/subsystem=logging/console-handler= CONSOLE_HANDLER_NAME :write-attribute(name=encoding,value= ENCODING )
/subsystem=logging/console-handler= CONSOLE_HANDLER_NAME :write-attribute(name=formatter,value= FORMAT )
/subsystem=logging/console-handler= CONSOLE_HANDLER_NAME :write-attribute(name=autoflush,value= AUTO_FLUSH )
/subsystem=logging/console-handler= CONSOLE_HANDLER_NAME :write-attribute(name=filter-spec, value= FILTER_EXPRESSION )
/subsystem=logging/root-logger=ROOT:add-handler(name= CONSOLE_HANDLER_NAME )
/subsystem=logging/logger= CATEGORY :add-handler(name= CONSOLE_HANDLER_NAME )
/subsystem=logging/console-handler= CONSOLE_HANDLER_NAME :remove
/subsystem=logging/file-handler= FILE_HANDLER_NAME :add(file={path= FILE_PATH ,relative-to= RELATIVE_TO_PATH })
/subsystem=logging/file-handler= FILE_HANDLER_NAME :write-attribute(name=level,value= LEVEL )
/subsystem=logging/file-handler= FILE_HANDLER_NAME :write-attribute(name=append,value= APPEND )
/subsystem=logging/file-handler= FILE_HANDLER_NAME :write-attribute(name=encoding,value= ENCODING )
/subsystem=logging/file-handler= FILE_HANDLER_NAME :write-attribute(name=formatter,value= FORMAT )
/subsystem=logging/file-handler= FILE_HANDLER_NAME :write-attribute(name=autoflush,value= AUTO_FLUSH )
/subsystem=logging/file-handler= FILE_HANDLER_NAME :write-attribute(name=filter-spec, value= FILTER_EXPRESSION )
/subsystem=logging/root-logger=ROOT:add-handler(name= FILE_HANDLER_NAME )
/subsystem=logging/logger= CATEGORY :add-handler(name= FILE_HANDLER_NAME )
/subsystem=logging/file-handler= FILE_HANDLER_NAME :remove
/subsystem=logging/periodic-rotating-file-handler= PERIODIC_HANDLER_NAME :add(file={path= FILE_PATH ,relative-to= RELATIVE_TO_PATH },suffix= SUFFIX )
/subsystem=logging/periodic-rotating-file-handler= PERIODIC_HANDLER_NAME :write-attribute(name=level,value= LEVEL )
/subsystem=logging/periodic-rotating-file-handler= PERIODIC_HANDLER_NAME :write-attribute(name=append,value= APPEND )
/subsystem=logging/periodic-rotating-file-handler= PERIODIC_HANDLER_NAME :write-attribute(name=encoding,value= ENCODING )
/subsystem=logging/periodic-rotating-file-handler= PERIODIC_HANDLER_NAME :write-attribute(name=formatter,value= FORMAT )
/subsystem=logging/periodic-rotating-file-handler= PERIODIC_HANDLER_NAME :write-attribute(name=autoflush,value= AUTO_FLUSH )
/subsystem=logging/periodic-rotating-file-handler= PERIODIC_HANDLER_NAME :write-attribute(name=filter-spec, value= FILTER_EXPRESSION )
/subsystem=logging/root-logger=ROOT:add-handler(name= PERIODIC_HANDLER_NAME )
/subsystem=logging/logger= CATEGORY :add-handler(name= PERIODIC_HANDLER_NAME )
/subsystem=logging/periodic-rotating-file-handler= PERIODIC_HANDLER_NAME :remove
/subsystem=logging/size-rotating-file-handler= SIZE_HANDLER_NAME :add(file={path= FILE_PATH ,relative-to= RELATIVE_TO_PATH })
/subsystem=logging/size-rotating-file-handler= SIZE_HANDLER_NAME :write-attribute(name=level,value= LEVEL )
/subsystem=logging/size-rotating-file-handler= SIZE_HANDLER_NAME :write-attribute(name=suffix, value= SUFFIX )
/subsystem=logging/size-rotating-file-handler= SIZE_HANDLER_NAME :write-attribute(name=rotate-size, value= ROTATE_SIZE )
/subsystem=logging/size-rotating-file-handler= SIZE_HANDLER_NAME :write-attribute(name=max-backup-index, value= MAX_BACKUPS )
/subsystem=logging/size-rotating-file-handler= SIZE_HANDLER_NAME :write-attribute(name=rotate-on-boot, value= ROTATE_ON_BOOT )
/subsystem=logging/size-rotating-file-handler= SIZE_HANDLER_NAME :write-attribute(name=append,value= APPEND )
/subsystem=logging/size-rotating-file-handler= SIZE_HANDLER_NAME :write-attribute(name=encoding,value= ENCODING )
/subsystem=logging/size-rotating-file-handler= SIZE_HANDLER_NAME :write-attribute(name=formatter,value= FORMAT )
/subsystem=logging/size-rotating-file-handler= SIZE_HANDLER_NAME :write-attribute(name=autoflush,value= AUTO_FLUSH )
/subsystem=logging/size-rotating-file-handler= SIZE_HANDLER_NAME :write-attribute(name=filter-spec, value= FILTER_EXPRESSION )
/subsystem=logging/root-logger=ROOT:add-handler(name= SIZE_HANDLER_NAME )
/subsystem=logging/logger= CATEGORY :add-handler(name= SIZE_HANDLER_NAME )
/subsystem=logging/size-rotating-file-handler= SIZE_HANDLER_NAME :remove
/subsystem=logging/periodic-size-rotating-file-handler= PERIODIC_SIZE_HANDLER_NAME :add(file={path= FILE_PATH ,relative-to= RELATIVE_TO_PATH },suffix= SUFFIX )
/subsystem=logging/periodic-size-rotating-file-handler= PERIODIC_SIZE_HANDLER_NAME :write-attribute(name=level,value= LEVEL )
/subsystem=logging/periodic-size-rotating-file-handler= PERIODIC_SIZE_HANDLER_NAME :write-attribute(name=rotate-size, value= ROTATE_SIZE )
/subsystem=logging/periodic-size-rotating-file-handler= PERIODIC_SIZE_HANDLER_NAME :write-attribute(name=max-backup-index, value= MAX_BACKUPS )
/subsystem=logging/periodic-size-rotating-file-handler= PERIODIC_SIZE_HANDLER_NAME :write-attribute(name=rotate-on-boot, value= ROTATE_ON_BOOT )
/subsystem=logging/periodic-size-rotating-file-handler= PERIODIC_SIZE_HANDLER_NAME :write-attribute(name=append,value= APPEND )
/subsystem=logging/periodic-size-rotating-file-handler= PERIODIC_SIZE_HANDLER_NAME :write-attribute(name=encoding,value= ENCODING )
/subsystem=logging/periodic-size-rotating-file-handler= PERIODIC_SIZE_HANDLER_NAME :write-attribute(name=formatter,value= FORMAT )
/subsystem=logging/periodic-size-rotating-file-handler= PERIODIC_SIZE_HANDLER_NAME :write-attribute(name=autoflush,value= AUTO_FLUSH )
/subsystem=logging/periodic-size-rotating-file-handler= PERIODIC_SIZE_HANDLER_NAME :write-attribute(name=filter-spec, value= FILTER_EXPRESSION )
/subsystem=logging/root-logger=ROOT:add-handler(name= PERIODIC_SIZE_HANDLER_NAME )
/subsystem=logging/logger= CATEGORY :add-handler(name= PERIODIC_SIZE_HANDLER_NAME )
/subsystem=logging/periodic-size-rotating-file-handler= PERIODIC_SIZE_HANDLER_NAME :remove
/subsystem=logging/syslog-handler= SYSLOG_HANDLER_NAME :add
/subsystem=logging/syslog-handler= SYSLOG_HANDLER_NAME :write-attribute(name=level,value= LEVEL )
/subsystem=logging/syslog-handler= SYSLOG_HANDLER_NAME :write-attribute(name=app-name,value= APP_NAME )
/subsystem=logging/syslog-handler= SYSLOG_HANDLER_NAME :write-attribute(name=server-address,value= SERVER_ADDRESS )
/subsystem=logging/syslog-handler= SYSLOG_HANDLER_NAME :write-attribute(name=port,value= PORT )
/subsystem=logging/syslog-handler= SYSLOG_HANDLER_NAME :write-attribute(name=syslog-format,value= SYSLOG_FORMAT )
/subsystem=logging/syslog-handler= SYSLOG_HANDLER_NAME :write-attribute(name=named-formatter, value=FORMATTER_NAME)
/subsystem=logging/root-logger=ROOT:add-handler(name= SYSLOG_HANDLER_NAME )
/subsystem=logging/logger= CATEGORY :add-handler(name= SYSLOG_HANDLER_NAME )
/subsystem=logging/syslog-handler= SYSLOG_HANDLER_NAME :remove
/socket-binding-group= SOCKET_BINDING_GROUP /remote-destination-outbound-socket-binding= SOCKET_BINDING_NAME :add(host= HOST , port= PORT )
/subsystem=logging/json-formatter= FORMATTER :add
/subsystem=logging/socket-handler= SOCKET_HANDLER_NAME :add(outbound-socket-binding-ref= SOCKET_BINDING_NAME ,named-formatter= FORMATTER )
/subsystem=logging/socket-handler= SOCKET_HANDLER_NAME :write-attribute(name=protocol,value= PROTOCOL )
/subsystem=logging/socket-handler= SOCKET_HANDLER_NAME :write-attribute(name=level,value= LEVEL )
/subsystem=logging/socket-handler= SOCKET_HANDLER_NAME :write-attribute(name=encoding,value= ENCODING )
/subsystem=logging/socket-handler= SOCKET_HANDLER_NAME :write-attribute(name=autoflush,value= AUTO_FLUSH )
/subsystem=logging/socket-handler= SOCKET_HANDLER_NAME :write-attribute(name=filter-spec, value= FILTER_EXPRESSION )
/subsystem=logging/root-logger=ROOT:add-handler(name= SOCKET_HANDLER_NAME )
/subsystem=logging/logger= CATEGORY :add-handler(name= SOCKET_HANDLER_NAME )
/subsystem=logging/socket-handler= SOCKET_HANDLER_NAME :remove
/subsystem=elytron/key-store=log-server-ks:add(path=/path/to/keystore.jks, type=JKS, credential-reference={clear-text=mypassword})
/subsystem=elytron/trust-manager=log-server-tm:add(key-store=log-server-ks)
/subsystem=elytron/client-ssl-context=log-server-context:add(trust-manager=log-server-tm, protocols=["TLSv1.2"])
/socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=log-server:add(host=localhost, port=4560)
/subsystem=logging/json-formatter=json:add
/subsystem=logging/socket-handler=log-server-handler:add(named-formatter=json, level=INFO, outbound-socket-binding-ref=log-server, protocol=SSL_TCP, ssl-context=log-server-context)
/subsystem=logging/root-logger=ROOT:add-handler(name=log-server-handler)
/subsystem=logging/custom-handler= CUSTOM_HANDLER_NAME :add(class= CLASS_NAME ,module= MODULE_NAME )
/subsystem=logging/custom-handler= CUSTOM_HANDLER_NAME :write-attribute(name=level,value= LEVEL )
/subsystem=logging/custom-handler= CUSTOM_HANDLER_NAME :write-attribute(name=properties. PROPERTY_NAME ,value= PROPERTY_VALUE )
/subsystem=logging/custom-handler= CUSTOM_HANDLER_NAME :write-attribute(name=encoding,value= ENCODING )
/subsystem=logging/custom-handler= CUSTOM_HANDLER_NAME :write-attribute(name=formatter,value= FORMAT )
/subsystem=logging/custom-handler= CUSTOM_HANDLER_NAME :write-attribute(name=filter-spec, value= FILTER_EXPRESSION )
/subsystem=logging/root-logger=ROOT:add-handler(name= CUSTOM_HANDLER_NAME )
/subsystem=logging/logger= CATEGORY :add-handler(name= CUSTOM_HANDLER_NAME )
/subsystem=logging/custom-handler= CUSTOM_HANDLER_NAME :remove
/subsystem=logging/async-handler= ASYNC_HANDLER_NAME :add(queue-length= QUEUE_LENGTH )
/subsystem=logging/async-handler= ASYNC_HANDLER_NAME :add-handler(name= HANDLER_NAME )
/subsystem=logging/async-handler= ASYNC_HANDLER_NAME :write-attribute(name=level,value= LEVEL )
/subsystem=logging/async-handler= ASYNC_HANDLER_NAME :write-attribute(name=overflow-action,value= OVERFLOW_ACTION )
/subsystem=logging/async-handler= ASYNC_HANDLER_NAME :write-attribute(name=filter-spec, value= FILTER_EXPRESSION )
/subsystem=logging/root-logger=ROOT:add-handler(name= ASYNC_HANDLER_NAME )
/subsystem=logging/logger= CATEGORY :add-handler(name= ASYNC_HANDLER_NAME )
/subsystem=logging/async-handler= ASYNC_HANDLER_NAME :remove
/subsystem=logging/root-logger=ROOT:add-handler(name= LOG_HANDLER_NAME )
/subsystem=logging/root-logger=ROOT:remove-handler(name= LOG_HANDLER_NAME )
/subsystem=logging/root-logger=ROOT:write-attribute(name=level,value= LEVEL )
/subsystem=logging/pattern-formatter= PATTERN_FORMATTER_NAME :add(pattern= PATTERN )
2016-03-18 15:49:32,075 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990
/subsystem=logging/pattern-formatter= PATTERN_FORMATTER_NAME :write-attribute(name=color-map,value=" LEVEL : COLOR , LEVEL : COLOR ")
/subsystem=logging/json-formatter= JSON_FORMATTER_NAME :add(pretty-print=true, exception-output-type=formatted)
{ "timestamp": "2018-10-18T13:53:43.031-04:00", "sequence": 62, "loggerClassName": "org.jboss.as.server.logging.ServerLogger_USDlogger", "loggerName": "org.jboss.as", "level": "INFO", "message": "WFLYSRV0025: JBoss EAP 7.4.0.GA (WildFly Core 15.0.2.Final-redhat-00001) started in 5227ms - Started 317 of 556 services (343 services are lazy, passive or on-demand), "threadName": "Controller Boot Thread", "threadId": 22, "mdc": { }, "ndc": "", "hostName": "localhost.localdomain", "processName": "jboss-modules.jar", "processId": 7461 }
/subsystem=logging/json-formatter=logstash:add(exception-output-type=formatted, key-overrides=[timestamp="@timestamp"], meta-data=[@version=1])
/subsystem=logging/xml-formatter= XML_FORMATTER_NAME :add(pretty-print=true, exception-output-type=detailed-and-formatted)
<record> <timestamp>2018-10-18T13:55:53.419-04:00</timestamp> <sequence>62</sequence> <loggerClassName>org.jboss.as.server.logging.ServerLogger_USDlogger</loggerClassName> <loggerName>org.jboss.as</loggerName> <level>INFO</level> <message>WFLYSRV0025: {ProductCurrentVersionExamples} (WildFly Core 10.0.0.Final-redhat-20190924) started in 6271ms - Started 495 of 679 services (331 services are lazy, passive or on-demand)</message> <threadName>Controller Boot Thread</threadName> <threadId>22</threadId> <mdc> </mdc> <ndc></ndc> <hostName>localhost.localdomain</hostName> <processName>jboss-modules.jar</processName> <processId>7790</processId> </record>
/subsystem=logging/xml-formatter= XML_FORMATTER_NAME :add(pretty-print=true, print-namespace=true, namespace-uri="urn:custom:1.0", key-overrides={message=msg, record=logRecord, timestamp=date}, print-details=true)
/subsystem=logging/custom-formatter= CUSTOM_FORMATTER_NAME :add(class= CLASS_NAME , module= MODULE_NAME )
/subsystem=logging/custom-formatter= CUSTOM_FORMATTER_NAME :write-attribute(name=properties. PROPERTY_NAME ,value= PROPERTY_VALUE )
/subsystem=logging/periodic-rotating-file-handler= FILE_HANDLER_NAME :write-attribute(name=named-formatter, value= CUSTOM_FORMATTER_NAME )
/subsystem=logging/custom-formatter=custom-xml-formatter:add(class=java.util.logging.XMLFormatter, module=org.jboss.logmanager) /subsystem=logging/console-handler=CONSOLE:write-attribute(name=named-formatter, value=custom-xml-formatter)
<record> <date>2016-03-23T12:58:13</date> <millis>1458752293091</millis> <sequence>93963</sequence> <logger>org.jboss.as</logger> <level>INFO</level> <class>org.jboss.as.server.BootstrapListener</class> <method>logAdminConsole</method> <thread>22</thread> <message>WFLYSRV0051: Admin console listening on http://%s:%d</message> <param>127.0.0.1</param> <param>9990</param> </record>
/subsystem=logging:write-attribute(name=use-deployment-logging-config,value=false)
/subsystem=logging/logging-profile= PROFILE_NAME :add
/subsystem=logging/logging-profile= PROFILE_NAME /file-handler= FILE_HANDLER_NAME :add(file={path=>" LOG_NAME .log", "relative-to"=>"jboss.server.log.dir"})
/subsystem=logging/logging-profile= PROFILE_NAME /file-handler= FILE_HANDLER_NAME :write-attribute(name="level", value="DEBUG")
/subsystem=logging/logging-profile= PROFILE_NAME /logger= CATEGORY_NAME :add(level=TRACE)
/subsystem=logging/logging-profile= PROFILE_NAME /logger= CATEGORY_NAME :add-handler(name=" FILE_HANDLER_NAME ")
/subsystem=logging/logging-profile=accounts-app-profile:add /subsystem=logging/logging-profile=accounts-app-profile/file-handler=ejb-trace-file:add(file={path=>"ejb-trace.log", "relative-to"=>"jboss.server.log.dir"}) /subsystem=logging/logging-profile=accounts-app-profile/file-handler=ejb-trace-file:write-attribute(name="level", value="DEBUG") /subsystem=logging/logging-profile=accounts-app-profile/logger=com.company.accounts.ejbs:add(level=TRACE) /subsystem=logging/logging-profile=accounts-app-profile/logger=com.company.accounts.ejbs:add-handler(name="ejb-trace-file")
<logging-profiles> <logging-profile name="accounts-app-profile"> <file-handler name="ejb-trace-file"> <level name="DEBUG"/> <file relative-to="jboss.server.log.dir" path="ejb-trace.log"/> </file-handler> <logger category="com.company.accounts.ejbs"> <level name="TRACE"/> <handlers> <handler name="ejb-trace-file"/> </handlers> </logger> </logging-profile> </logging-profiles>
Manifest-Version: 1.0 Logging-Profile: accounts-app-profile
/deployment= DEPLOYMENT_NAME /subsystem=logging/configuration= CONFIG :read-resource
/deployment=mydeployment.war/subsystem=logging/configuration=profile-MYPROFILE:read-resource(recursive=true,include-runtime=true)
{ "outcome" => "success", "result" => { "error-manager" => undefined, "filter" => undefined, "formatter" => { "MYFORMATTER" => { "class-name" => "org.jboss.logmanager.formatters.PatternFormatter", "module" => undefined, "properties" => {"pattern" => "%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n"} } }, "handler" => { "MYPERIODIC" => { "class-name" => "org.jboss.logmanager.handlers.PeriodicRotatingFileHandler", "encoding" => undefined, "error-manager" => undefined, "filter" => undefined, "formatter" => "MYFORMATTER", "handlers" => [], "level" => "ALL", "module" => undefined, "properties" => { "append" => "true", "autoFlush" => "true", "enabled" => "true", "suffix" => ".yyyy-MM-dd", "fileName" => " EAP_HOME /standalone/log/deployment.log" } } }, "logger" => {"MYCATEGORY" => { "filter" => undefined, "handlers" => [], "level" => "DEBUG", "use-parent-handlers" => true }}, "pojo" => undefined } }
/deployment= DEPLOYMENT_NAME /subsystem=logging:read-resource(include-runtime=true, recursive=true)
EAP_HOME /bin/jboss-cli.sh
[disconnected /] module add --name= MODULE_NAME --resources= PATH_TO_JDBC_JAR --dependencies= DEPENDENCIES
[disconnected /] module add --name=com.mysql --resources= /path/to /mysql-connector-java-8.0.12.jar --dependencies=javax.transaction.api,sun.jdk,ibm.jdk,javaee.api,javax.api
EAP_HOME /bin/jboss-cli.sh --command="module add --name= MODULE_NAME --resources= PATH_TO_JDBC_JAR --dependencies= DEPENDENCIES "
/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 )
/subsystem=datasources/jdbc-driver=mysql:add(driver-name=mysql,driver-module-name=com.mysql,driver-xa-datasource-class-name=com.mysql.cj.jdbc.MysqlXADataSource, driver-class-name=com.mysql.cj.jdbc.Driver)
deploy PATH_TO_JDBC_JAR
deploy /path/to /mysql-connector-java-8.0.12.jar
WFLYJCA0018: Started Driver service with driver-name = mysql-connector-java-8.0.12.jar
com.mysql.cj.jdbc.Driver
jar \-uf jdbc-driver.jar META-INF/services/java.sql.Driver
Dependencies: com.mysql
<jboss-deployment-structure> <deployment> <dependencies> <module name="com.mysql"/> </dependencies> </deployment> </jboss-deployment-structure>
import java.sql.Connection; Connection c = ds.getConnection(); if (c.isWrapperFor(com.mysql.jdbc.Connection.class)) { com.mysql.jdbc.Connection mc = c.unwrap(com.mysql.jdbc.Connection.class); }
data-source add --name= DATASOURCE_NAME --jndi-name= JNDI_NAME --driver-name= DRIVER_NAME --connection-url= CONNECTION_URL --user-name= USER_NAME --password= PASSWORD
WFLYJCA0018: Started Driver service with driver-name = mysql-connector-java-5.1.36-bin.jar_com.mysql.cj.jdbc.Driver_5_1
xa-data-source add --name= XA_DATASOURCE_NAME --jndi-name= JNDI_NAME --driver-name= DRIVER_NAME --xa-datasource-class= XA_DATASOURCE_CLASS --xa-datasource-properties={"ServerName"=>" HOST_NAME ","DatabaseName"=>" DATABASE_NAME "}
/subsystem=datasources/xa-data-source= XA_DATASOURCE_NAME /xa-datasource-properties=ServerName:add(value= HOST_NAME )
/subsystem=datasources/xa-data-source= XA_DATASOURCE_NAME /xa-datasource-properties=DatabaseName:add(value= DATABASE_NAME )
WFLYJCA0018: Started Driver service with driver-name = mysql-connector-java-5.1.36-bin.jar_com.mysql.cj.jdbc.Driver_5_1
data-source --name= DATASOURCE_NAME -- ATTRIBUTE_NAME = ATTRIBUTE_VALUE
xa-data-source --name= XA_DATASOURCE_NAME -- ATTRIBUTE_NAME = ATTRIBUTE_VALUE
/subsystem=datasources/xa-data-source= XA_DATASOURCE_NAME /xa-datasource-properties= PROPERTY :add(value= VALUE )
data-source remove --name= DATASOURCE_NAME
xa-data-source remove --name= XA_DATASOURCE_NAME
/subsystem=datasources/data-source= DATASOURCE_NAME :test-connection-in-pool
/subsystem=datasources/data-source= DATASOURCE_NAME :flush-all-connection-in-pool
/subsystem=datasources/data-source= DATASOURCE_NAME :flush-gracefully-connection-in-pool
/subsystem=datasources/data-source= DATASOURCE_NAME :flush-idle-connection-in-pool
/subsystem=datasources/data-source= DATASOURCE_NAME :flush-invalid-connection-in-pool
/subsystem=datasources/xa-data-source= XA_DATASOURCE_NAME :write-attribute(name=no-recovery,value=true)
GRANT SELECT ON sys.dba_pending_transactions TO USER; GRANT SELECT ON sys.pending_transUSD TO USER; GRANT SELECT ON sys.dba_2pc_pending TO USER; GRANT EXECUTE ON sys.dbms_xa TO USER;
WARN [com.arjuna.ats.jta.logging.loggerI18N] [com.arjuna.ats.internal.jta.recovery.xarecovery1] Local XARecoveryModule.xaRecovery got XA exception javax.transaction.xa.XAException, XAException.XAER_RMERR
sp_configure 'enable xact coordination', 1
select 1 from dual
select 1
/subsystem=security/security-domain=DsRealm:add(cache-type=default) /subsystem=security/security-domain=DsRealm/authentication=classic:add(login-modules=[{code=ConfiguredIdentity,flag=required,module-options={userName=sa, principal=sa, password=sa}}])
<security-domain name="DsRealm" cache-type="default"> <authentication> <login-module code="ConfiguredIdentity" flag="required"> <module-option name="userName" value="sa"/> <module-option name="principal" value="sa"/> <module-option name="password" value="sa"/> </login-module> </authentication> </security-domain>
data-source add --name=securityDs --jndi-name=java:jboss/datasources/securityDs --connection-url=jdbc:h2:mem:test;DB_CLOSE_DELAY=-1 --driver-name=h2 --new-connection-sql="select current_user()"
data-source --name=securityDs --security-domain=DsRealm
reload
<datasources> <datasource jndi-name="java:jboss/datasources/securityDs" pool-name="securityDs"> <connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1</connection-url> <driver>h2</driver> <new-connection-sql>select current_user()</new-connection-sql> <security> <security-domain>DsRealm</security-domain> </security> </datasource> </datasources>
data-source --name=ExampleDS --password=USD{VAULT::ds_ExampleDS::password::N2NhZDYzOTMtNWE0OS00ZGQ0LWE4MmEtMWNlMDMyNDdmNmI2TElORV9CUkVBS3ZhdWx0}
reload
<security> <user-name>admin</user-name> <password>USD{VAULT::ds_ExampleDS::password::N2NhZDYzOTMtNWE0OS00ZGQ0LWE4MmEtMWNlMDMyNDdmNmI2TElORV9CUkVBS3ZhdWx0}</password> </security>
/subsystem=datasources/data-source=ExampleDS:write-attribute(name=credential-reference,value={store=exampleCS, alias=example-ds-pw})
/subsystem=datasources/data-source=ExampleDS:undefine-attribute(name=password) /subsystem=datasources/data-source=ExampleDS:undefine-attribute(name=user-name)
/subsystem=datasources/data-source=ExampleDS:write-attribute(name=elytron-enabled,value=true) reload
/subsystem=elytron/authentication-configuration=exampleAuthConfig:add(authentication-name=sa,credential-reference={clear-text=sa})
/subsystem=elytron/authentication-context=exampleAuthContext:add(match-rules=[{authentication-configuration=exampleAuthConfig}])
/subsystem=datasources/data-source=ExampleDS:write-attribute(name=authentication-context,value=exampleAuthContext) reload
/system-property=java.security.krb5.conf:add(value="/path/to/krb5.conf") /system-property=sun.security.krb5.debug:add(value="false") /system-property=sun.security.spnego.debug:add(value="false")
batch /subsystem=infinispan/cache-container=security:add(default-cache=auth-cache) /subsystem=infinispan/cache-container=security/local-cache=auth-cache:add() /subsystem=infinispan/cache-container=security/local-cache=auth-cache/expiration=EXPIRATION:add(lifespan=3540000,max-idle=3540000) /subsystem=infinispan/cache-container=security/local-cache=auth-cache/memory=object:add(size=1000) run-batch
batch /subsystem=security/security-domain=KerberosDatabase:add(cache-type=infinispan) /subsystem=security/security-domain=KerberosDatabase/authentication=classic:add /subsystem=security/security-domain=KerberosDatabase/authentication=classic/login-module="KerberosDatabase-Module":add(code="org.jboss.security.negotiation.KerberosLoginModule",module="org.jboss.security.negotiation",flag=required, module-options={ "debug" => "false", "storeKey" => "false", "useKeyTab" => "true", "keyTab" => "/path/to/eap.keytab", "principal" => "PRINCIPAL@SERVER.COM", "doNotPrompt" => "true", "refreshKrb5Config" => "true", "isInitiator" => "true", "addGSSCredential" => "true", "credentialLifetime" => "-1"}) run-batch
/subsystem=elytron/kerberos-security-factory=krbsf:add(debug=false, principal=PRINCIPAL@SERVER.COM, path=/path/to/keytab, request-lifetime=-1, obtain-kerberos-ticket=true, server=false)
/subsystem=elytron/authentication-configuration=kerberos-conf:add(kerberos-security-factory=krbsf)
/subsystem=elytron/authentication-context=ds-context:add(match-rules=[{authentication-configuration=kerberos-conf}])
/subsystem=datasources/data-source=KerberosDS:add(connection-url="URL", min-pool-size=0, max-pool-size=10, jndi-name="java:jboss/datasource/KerberosDS", driver-name=<jdbc-driver>.jar, security-domain=KerberosDatabase, allow-multiple-users=false, pool-prefill=false, pool-use-strict-min=false, idle-timeout-minutes=2)
/subsystem=datasources/data-source=KerberosDS/connection-properties=<connection-property-name>:add(value="(<kerberos-value>)")
/subsystem=datasources/data-source=KerberosDS/connection-properties=oracle.net.authentication_services:add(value="(KERBEROS5)")
/subsystem=datasources/data-source=KerberosDS:add(connection-url="URL", min-pool-size=0, max-pool-size=10, jndi-name="java:jboss/datasource/KerberosDS", driver-name=<jdbc-driver>.jar, elytron-enabled=true, authentication-context=ds-context, allow-multiple-users=false, pool-prefill=false, pool-use-strict-min=false, idle-timeout-minutes=2)
/subsystem=datasources/data-source=KerberosDS/connection-properties=<connection-property-name>:add(value="(<kerberos-value>)")
/subsystem=datasources/data-source=KerberosDS/connection-properties=oracle.net.authentication_services:add(value="(KERBEROS5)")
/subsystem=datasources/data-source=ExampleDS:write-attribute(name=statistics-enabled,value=true)
/subsystem=datasources/data-source=ExampleDS/statistics=pool:read-resource(include-runtime=true) { "outcome" => "success", "result" => { "ActiveCount" => 1, "AvailableCount" => 20, "AverageBlockingTime" => 0L, "AverageCreationTime" => 122L, "AverageGetTime" => 128L, "AveragePoolTime" => 0L, "AverageUsageTime" => 0L, "BlockingFailureCount" => 0, "CreatedCount" => 1, "DestroyedCount" => 0, "IdleCount" => 1, }
/subsystem=datasources/data-source=ExampleDS/statistics=jdbc:read-resource(include-runtime=true) { "outcome" => "success", "result" => { "PreparedStatementCacheAccessCount" => 0L, "PreparedStatementCacheAddCount" => 0L, "PreparedStatementCacheCurrentSize" => 0, "PreparedStatementCacheDeleteCount" => 0L, "PreparedStatementCacheHitCount" => 0L, "PreparedStatementCacheMissCount" => 0L, "statistics-enabled" => true } }
/subsystem=datasources/data-source=ExampleDS:write-attribute(name=capacity-incrementer-class, value="org.jboss.jca.core.connectionmanager.pool.capacity.SizeIncrementer") /subsystem=datasources/data-source=ExampleDS:write-attribute(name=capacity-decrementer-class, value="org.jboss.jca.core.connectionmanager.pool.capacity.SizeDecrementer")
/subsystem=datasources/data-source=ExampleDS:write-attribute(name=capacity-incrementer-properties.size, value=2) /subsystem=datasources/data-source=ExampleDS:write-attribute(name=capacity-decrementer-properties.size, value=2)
data-source --name= DATASOURCE_NAME --enlistment-trace=true
xa-data-source --name= XA_DATASOURCE_NAME --enlistment-trace=true
<datasources> <datasource jndi-name="java:jboss/MySqlDS" pool-name="MySqlDS"> <connection-url>jdbc:mysql://localhost:3306/jbossdb</connection-url> <driver>mysql</driver> <security> <user-name>admin</user-name> <password>admin</password> </security> <validation> <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLValidConnectionChecker"/> <validate-on-match>true</validate-on-match> <background-validation>false</background-validation> <exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLExceptionSorter"/> </validation> </datasource> <drivers> <driver name="mysql" module="com.mysql"> <driver-class>com.mysql.cj.jdbc.Driver</driver-class> <xa-datasource-class>com.mysql.cj.jdbc.MysqlXADataSource</xa-datasource-class> </driver> </drivers> </datasources>
<?xml version="1.0" ?> <module xmlns="urn:jboss:module:1.1" name="com.mysql"> <resources> <resource-root path="mysql-connector-java-8.0.12.jar"/> </resources> <dependencies> <module name="javaee.api"/> <module name="sun.jdk"/> <module name="ibm.jdk"/> <module name="javax.api"/> <module name="javax.transaction.api"/> </dependencies> </module>
module add --name=com.mysql --resources= /path/to/mysql-connector-java-8.0.12.jar --dependencies=javaee.api,sun.jdk,ibm.jdk,javax.api,javax.transaction.api
/subsystem=datasources/jdbc-driver=mysql:add(driver-name=mysql,driver-module-name=com.mysql,driver-xa-datasource-class-name=com.mysql.cj.jdbc.MysqlXADataSource, driver-class-name=com.mysql.cj.jdbc.Driver)
data-source add --name=MySqlDS --jndi-name=java:jboss/MySqlDS --driver-name=mysql --connection-url=jdbc:mysql://localhost:3306/jbossdb --user-name=admin --password=admin --validate-on-match=true --background-validation=false --valid-connection-checker-class-name=org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLValidConnectionChecker --exception-sorter-class-name=org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLExceptionSorter
<datasources> <xa-datasource jndi-name="java:jboss/MySqlXADS" pool-name="MySqlXADS"> <xa-datasource-property name="ServerName"> localhost </xa-datasource-property> <xa-datasource-property name="DatabaseName"> mysqldb </xa-datasource-property> <driver>mysql</driver> <security> <user-name>admin</user-name> <password>admin</password> </security> <validation> <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLValidConnectionChecker"/> <validate-on-match>true</validate-on-match> <background-validation>false</background-validation> <exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLExceptionSorter"/> </validation> </xa-datasource> <drivers> <driver name="mysql" module="com.mysql"> <driver-class>com.mysql.cj.jdbc.Driver</driver-class> <xa-datasource-class>com.mysql.cj.jdbc.MysqlXADataSource</xa-datasource-class> </driver> </drivers> </datasources>
<?xml version="1.0" ?> <module xmlns="urn:jboss:module:1.1" name="com.mysql"> <resources> <resource-root path="mysql-connector-java-8.0.12.jar"/> </resources> <dependencies> <module name="javaee.api"/> <module name="sun.jdk"/> <module name="ibm.jdk"/> <module name="javax.api"/> <module name="javax.transaction.api"/> </dependencies> </module>
module add --name=com.mysql --resources= /path/to/mysql-connector-java-8.0.12.jar --dependencies=javaee.api,sun.jdk,ibm.jdk,javax.api,javax.transaction.api
/subsystem=datasources/jdbc-driver=mysql:add(driver-name=mysql,driver-module-name=com.mysql,driver-xa-datasource-class-name=com.mysql.cj.jdbc.MysqlXADataSource, driver-class-name=com.mysql.cj.jdbc.Driver)
xa-data-source add --name=MySqlXADS --jndi-name=java:jboss/MySqlXADS --driver-name=mysql --user-name=admin --password=admin --validate-on-match=true --background-validation=false --valid-connection-checker-class-name=org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLValidConnectionChecker --exception-sorter-class-name=org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLExceptionSorter --xa-datasource-properties={"ServerName"=>"localhost","DatabaseName"=>"mysqldb"}
<datasources> <datasource jndi-name="java:jboss/PostgresDS" pool-name="PostgresDS"> <connection-url>jdbc:postgresql://localhost:5432/postgresdb</connection-url> <driver>postgresql</driver> <security> <user-name>admin</user-name> <password>admin</password> </security> <validation> <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLValidConnectionChecker"/> <validate-on-match>true</validate-on-match> <background-validation>false</background-validation> <exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLExceptionSorter"/> </validation> </datasource> <drivers> <driver name="postgresql" module="com.postgresql"> <xa-datasource-class>org.postgresql.xa.PGXADataSource</xa-datasource-class> </driver> </drivers> </datasources>
<?xml version="1.0" ?> <module xmlns="urn:jboss:module:1.1" name="com.postgresql"> <resources> <resource-root path="postgresql-42.x.y.jar"/> </resources> <dependencies> <module name="javaee.api"/> <module name="sun.jdk"/> <module name="ibm.jdk"/> <module name="javax.api"/> <module name="javax.transaction.api"/> </dependencies> </module>
module add --name=com.postgresql --resources= /path/to/postgresql-42.x.y.jar --dependencies=javaee.api,sun.jdk,ibm.jdk,javax.api,javax.transaction.api
/subsystem=datasources/jdbc-driver=postgresql:add(driver-name=postgresql,driver-module-name=com.postgresql,driver-xa-datasource-class-name=org.postgresql.xa.PGXADataSource)
data-source add --name=PostgresDS --jndi-name=java:jboss/PostgresDS --driver-name=postgresql --connection-url=jdbc:postgresql://localhost:5432/postgresdb --user-name=admin --password=admin --validate-on-match=true --background-validation=false --valid-connection-checker-class-name=org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLValidConnectionChecker --exception-sorter-class-name=org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLExceptionSorter
<datasources> <xa-datasource jndi-name="java:jboss/PostgresXADS" pool-name="PostgresXADS"> <xa-datasource-property name="ServerName"> localhost </xa-datasource-property> <xa-datasource-property name="PortNumber"> 5432 </xa-datasource-property> <xa-datasource-property name="DatabaseName"> postgresdb </xa-datasource-property> <driver>postgresql</driver> <security> <user-name>admin</user-name> <password>admin</password> </security> <validation> <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLValidConnectionChecker"/> <validate-on-match>true</validate-on-match> <background-validation>false</background-validation> <exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLExceptionSorter"/> </validation> </xa-datasource> <drivers> <driver name="postgresql" module="com.postgresql"> <xa-datasource-class>org.postgresql.xa.PGXADataSource</xa-datasource-class> </driver> </drivers> </datasources>
<?xml version="1.0" ?> <module xmlns="urn:jboss:module:1.1" name="com.postgresql"> <resources> <resource-root path="postgresql-42.x.y.jar"/> </resources> <dependencies> <module name="javaee.api"/> <module name="sun.jdk"/> <module name="ibm.jdk"/> <module name="javax.api"/> <module name="javax.transaction.api"/> </dependencies> </module>
module add --name=com.postgresql --resources= /path/to/postgresql-42.x.y.jar --dependencies=javaee.api,sun.jdk,ibm.jdk,javax.api,javax.transaction.api
/subsystem=datasources/jdbc-driver=postgresql:add(driver-name=postgresql,driver-module-name=com.postgresql,driver-xa-datasource-class-name=org.postgresql.xa.PGXADataSource)
xa-data-source add --name=PostgresXADS --jndi-name=java:jboss/PostgresXADS --driver-name=postgresql --user-name=admin --password=admin --validate-on-match=true --background-validation=false --valid-connection-checker-class-name=org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLValidConnectionChecker --exception-sorter-class-name=org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLExceptionSorter --xa-datasource-properties={"ServerName"=>"localhost","PortNumber"=>"5432","DatabaseName"=>"postgresdb"}
<datasources> <datasource jndi-name="java:jboss/OracleDS" pool-name="OracleDS"> <connection-url>jdbc:oracle:thin:@localhost:1521:XE</connection-url> <driver>oracle</driver> <security> <user-name>admin</user-name> <password>admin</password> </security> <validation> <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleValidConnectionChecker"/> <validate-on-match>true</validate-on-match> <background-validation>false</background-validation> <exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleExceptionSorter"/> </validation> </datasource> <drivers> <driver name="oracle" module="com.oracle"> <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class> </driver> </drivers> </datasources>
<?xml version="1.0" ?> <module xmlns="urn:jboss:module:1.1" name="com.oracle"> <resources> <resource-root path="ojdbc7.jar"/> </resources> <dependencies> <module name="javaee.api"/> <module name="sun.jdk"/> <module name="ibm.jdk"/> <module name="javax.api"/> <module name="javax.transaction.api"/> </dependencies> </module>
module add --name=com.oracle --resources= /path/to/ojdbc7.jar --dependencies=javaee.api,sun.jdk,ibm.jdk,javax.api,javax.transaction.api
/subsystem=datasources/jdbc-driver=oracle:add(driver-name=oracle,driver-module-name=com.oracle,driver-xa-datasource-class-name=oracle.jdbc.xa.client.OracleXADataSource)
data-source add --name=OracleDS --jndi-name=java:jboss/OracleDS --driver-name=oracle --connection-url=jdbc:oracle:thin:@localhost:1521:XE --user-name=admin --password=admin --validate-on-match=true --background-validation=false --valid-connection-checker-class-name=org.jboss.jca.adapters.jdbc.extensions.oracle.OracleValidConnectionChecker --exception-sorter-class-name=org.jboss.jca.adapters.jdbc.extensions.oracle.OracleExceptionSorter
<datasources> <xa-datasource jndi-name="java:jboss/OracleXADS" pool-name="OracleXADS"> <xa-datasource-property name="URL"> jdbc:oracle:thin:@oracleHostName:1521:orcl </xa-datasource-property> <driver>oracle</driver> <xa-pool> <is-same-rm-override>false</is-same-rm-override> </xa-pool> <security> <user-name>admin</user-name> <password>admin</password> </security> <validation> <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleValidConnectionChecker"/> <validate-on-match>true</validate-on-match> <background-validation>false</background-validation> <exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleExceptionSorter"/> </validation> </xa-datasource> <drivers> <driver name="oracle" module="com.oracle"> <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class> </driver> </drivers> </datasources>
<?xml version="1.0" ?> <module xmlns="urn:jboss:module:1.1" name="com.oracle"> <resources> <resource-root path="ojdbc7.jar"/> </resources> <dependencies> <module name="javaee.api"/> <module name="sun.jdk"/> <module name="ibm.jdk"/> <module name="javax.api"/> <module name="javax.transaction.api"/> </dependencies> </module>
module add --name=com.oracle --resources= /path/to/ojdbc7.jar --dependencies=javaee.api,sun.jdk,ibm.jdk,javax.api,javax.transaction.api
/subsystem=datasources/jdbc-driver=oracle:add(driver-name=oracle,driver-module-name=com.oracle,driver-xa-datasource-class-name=oracle.jdbc.xa.client.OracleXADataSource)
xa-data-source add --name=OracleXADS --jndi-name=java:jboss/OracleXADS --driver-name=oracle --user-name=admin --password=admin --validate-on-match=true --background-validation=false --valid-connection-checker-class-name=org.jboss.jca.adapters.jdbc.extensions.oracle.OracleValidConnectionChecker --exception-sorter-class-name=org.jboss.jca.adapters.jdbc.extensions.oracle.OracleExceptionSorter --same-rm-override=false --xa-datasource-properties={"URL"=>"jdbc:oracle:thin:@oracleHostName:1521:orcl"}
<datasources> <datasource jndi-name="java:jboss/OracleDS" pool-name="OracleDS"> <connection-url>jdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE=on)(ADDRESS=(PROTOCOL=TCP)(HOST=host1)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=host2)(PORT=1521))</connection-url> <driver>oracle</driver> <security> <user-name>admin</user-name> <password>admin</password> </security> <validation> <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleValidConnectionChecker"/> <validate-on-match>true</validate-on-match> <background-validation>false</background-validation> <exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleExceptionSorter"/> </validation> </datasource> <drivers> <driver name="oracle" module="com.oracle"> <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class> </driver> </drivers> </datasources>
<?xml version="1.0" ?> <module xmlns="urn:jboss:module:1.1" name="com.oracle"> <resources> <resource-root path="ojdbc7.jar"/> </resources> <dependencies> <module name="javaee.api"/> <module name="sun.jdk"/> <module name="ibm.jdk"/> <module name="javax.api"/> <module name="javax.transaction.api"/> </dependencies> </module>
module add --name=com.oracle --resources= /path/to/ojdbc7.jar --dependencies=javaee.api,sun.jdk,ibm.jdk,javax.api,javax.transaction.api
/subsystem=datasources/jdbc-driver=oracle:add(driver-name=oracle,driver-module-name=com.oracle,driver-xa-datasource-class-name=oracle.jdbc.xa.client.OracleXADataSource)
data-source add --name=OracleDS --jndi-name=java:jboss/OracleDS --driver-name=oracle --connection-url="jdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE=on)(ADDRESS=(PROTOCOL=TCP)(HOST=host1)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=host2)(PORT=1521))" --user-name=admin --password=admin --validate-on-match=true --background-validation=false --valid-connection-checker-class-name=org.jboss.jca.adapters.jdbc.extensions.oracle.OracleValidConnectionChecker --exception-sorter-class-name=org.jboss.jca.adapters.jdbc.extensions.oracle.OracleExceptionSorter
<datasources> <xa-datasource jndi-name="java:jboss/OracleXADS" pool-name="OracleXADS"> <xa-datasource-property name="URL"> jdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE=on)(ADDRESS=(PROTOCOL=TCP)(HOST=host1)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=host2)(PORT=1521)) </xa-datasource-property> <driver>oracle</driver> <xa-pool> <is-same-rm-override>false</is-same-rm-override> </xa-pool> <security> <user-name>admin</user-name> <password>admin</password> </security> <validation> <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleValidConnectionChecker"/> <validate-on-match>true</validate-on-match> <background-validation>false</background-validation> <exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleExceptionSorter"/> </validation> </xa-datasource> <drivers> <driver name="oracle" module="com.oracle"> <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class> </driver> </drivers> </datasources>
<?xml version="1.0" ?> <module xmlns="urn:jboss:module:1.1" name="com.oracle"> <resources> <resource-root path="ojdbc7.jar"/> </resources> <dependencies> <module name="javaee.api"/> <module name="sun.jdk"/> <module name="ibm.jdk"/> <module name="javax.api"/> <module name="javax.transaction.api"/> </dependencies> </module>
module add --name=com.oracle --resources= /path/to/ojdbc7.jar --dependencies=javaee.api,sun.jdk,ibm.jdk,javax.api,javax.transaction.api
/subsystem=datasources/jdbc-driver=oracle:add(driver-name=oracle,driver-module-name=com.oracle,driver-xa-datasource-class-name=oracle.jdbc.xa.client.OracleXADataSource)
xa-data-source add --name=OracleXADS --jndi-name=java:jboss/OracleXADS --driver-name=oracle --user-name=admin --password=admin --validate-on-match=true --background-validation=false --valid-connection-checker-class-name=org.jboss.jca.adapters.jdbc.extensions.oracle.OracleValidConnectionChecker --exception-sorter-class-name=org.jboss.jca.adapters.jdbc.extensions.oracle.OracleExceptionSorter --same-rm-override=false --xa-datasource-properties={"URL"=>"jdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE=on)(ADDRESS=(PROTOCOL=TCP)(HOST=host1)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=host2)(PORT=1521))"}
<datasources> <datasource jndi-name="java:jboss/MSSQLDS" pool-name="MSSQLDS"> <connection-url>jdbc:sqlserver://localhost:1433;DatabaseName=MyDatabase</connection-url> <driver>sqlserver</driver> <security> <user-name>admin</user-name> <password>admin</password> </security> <validation> <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.mssql.MSSQLValidConnectionChecker"/> <validate-on-match>true</validate-on-match> <background-validation>false</background-validation> <exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.mssql.MSSQLExceptionSorter"/> </validation> </datasource> <drivers> <driver name="sqlserver" module="com.microsoft"> <xa-datasource-class>com.microsoft.sqlserver.jdbc.SQLServerXADataSource</xa-datasource-class> </driver> </drivers> </datasources>
<?xml version="1.0" ?> <module xmlns="urn:jboss:module:1.1" name="com.microsoft"> <resources> <resource-root path="sqljdbc42.jar"/> </resources> <dependencies> <module name="javaee.api"/> <module name="sun.jdk"/> <module name="ibm.jdk"/> <module name="javax.api"/> <module name="javax.transaction.api"/> <module name="javax.xml.bind.api"/> </dependencies> </module>
module add --name=com.microsoft --resources= /path/to/sqljdbc42.jar --dependencies=javax.api,javax.transaction.api,javax.xml.bind.api,javaee.api,sun.jdk,ibm.jdk
/subsystem=datasources/jdbc-driver=sqlserver:add(driver-name=sqlserver,driver-module-name=com.microsoft,driver-xa-datasource-class-name=com.microsoft.sqlserver.jdbc.SQLServerXADataSource)
data-source add --name=MSSQLDS --jndi-name=java:jboss/MSSQLDS --driver-name=sqlserver --connection-url=jdbc:sqlserver://localhost:1433;DatabaseName=MyDatabase --user-name=admin --password=admin --validate-on-match=true --background-validation=false --valid-connection-checker-class-name=org.jboss.jca.adapters.jdbc.extensions.mssql.MSSQLValidConnectionChecker --exception-sorter-class-name=org.jboss.jca.adapters.jdbc.extensions.mssql.MSSQLExceptionSorter
<datasources> <xa-datasource jndi-name="java:jboss/MSSQLXADS" pool-name="MSSQLXADS"> <xa-datasource-property name="ServerName"> localhost </xa-datasource-property> <xa-datasource-property name="DatabaseName"> mssqldb </xa-datasource-property> <xa-datasource-property name="SelectMethod"> cursor </xa-datasource-property> <driver>sqlserver</driver> <xa-pool> <is-same-rm-override>false</is-same-rm-override> </xa-pool> <security> <user-name>admin</user-name> <password>admin</password> </security> <validation> <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.mssql.MSSQLValidConnectionChecker"/> <validate-on-match>true</validate-on-match> <background-validation>false</background-validation> <exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.mssql.MSSQLExceptionSorter"/> </validation> </xa-datasource> <drivers> <driver name="sqlserver" module="com.microsoft"> <xa-datasource-class>com.microsoft.sqlserver.jdbc.SQLServerXADataSource</xa-datasource-class> </driver> </drivers> </datasources>
<?xml version="1.0" ?> <module xmlns="urn:jboss:module:1.1" name="com.microsoft"> <resources> <resource-root path="sqljdbc42.jar"/> </resources> <dependencies> <module name="javaee.api"/> <module name="sun.jdk"/> <module name="ibm.jdk"/> <module name="javax.api"/> <module name="javax.transaction.api"/> <module name="javax.xml.bind.api"/> </dependencies> </module>
module add --name=com.microsoft --resources= /path/to/sqljdbc42.jar --dependencies=javax.api,javax.transaction.api,javax.xml.bind.api,javaee.api,sun.jdk,ibm.jdk
/subsystem=datasources/jdbc-driver=sqlserver:add(driver-name=sqlserver,driver-module-name=com.microsoft,driver-xa-datasource-class-name=com.microsoft.sqlserver.jdbc.SQLServerXADataSource)
xa-data-source add --name=MSSQLXADS --jndi-name=java:jboss/MSSQLXADS --driver-name=sqlserver --user-name=admin --password=admin --validate-on-match=true --background-validation=false --background-validation=false --valid-connection-checker-class-name=org.jboss.jca.adapters.jdbc.extensions.mssql.MSSQLValidConnectionChecker --exception-sorter-class-name=org.jboss.jca.adapters.jdbc.extensions.mssql.MSSQLExceptionSorter --same-rm-override=false --xa-datasource-properties={"ServerName"=>"localhost","DatabaseName"=>"mssqldb","SelectMethod"=>"cursor"}
<datasources> <datasource jndi-name="java:jboss/DB2DS" pool-name="DB2DS"> <connection-url>jdbc:db2://localhost:50000/ibmdb2db</connection-url> <driver>ibmdb2</driver> <pool> <min-pool-size>0</min-pool-size> <max-pool-size>50</max-pool-size> </pool> <security> <user-name>admin</user-name> <password>admin</password> </security> <validation> <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.db2.DB2ValidConnectionChecker"/> <validate-on-match>true</validate-on-match> <background-validation>false</background-validation> <exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.db2.DB2ExceptionSorter"/> </validation> </datasource> <drivers> <driver name="ibmdb2" module="com.ibm"> <xa-datasource-class>com.ibm.db2.jcc.DB2XADataSource</xa-datasource-class> </driver> </drivers> </datasources>
<?xml version="1.0" ?> <module xmlns="urn:jboss:module:1.1" name="com.ibm"> <resources> <resource-root path="db2jcc4.jar"/> </resources> <dependencies> <module name="javaee.api"/> <module name="sun.jdk"/> <module name="ibm.jdk"/> <module name="javax.api"/> <module name="javax.transaction.api"/> </dependencies> </module>
module add --name=com.ibm --resources= /path/to/db2jcc4.jar --dependencies=javaee.api,sun.jdk,ibm.jdk,javax.api,javax.transaction.api
/subsystem=datasources/jdbc-driver=ibmdb2:add(driver-name=ibmdb2,driver-module-name=com.ibm,driver-xa-datasource-class-name=com.ibm.db2.jcc.DB2XADataSource)
data-source add --name=DB2DS --jndi-name=java:jboss/DB2DS --driver-name=ibmdb2 --connection-url=jdbc:db2://localhost:50000/ibmdb2db --user-name=admin --password=admin --validate-on-match=true --background-validation=false --valid-connection-checker-class-name=org.jboss.jca.adapters.jdbc.extensions.db2.DB2ValidConnectionChecker --exception-sorter-class-name=org.jboss.jca.adapters.jdbc.extensions.db2.DB2ExceptionSorter --min-pool-size=0 --max-pool-size=50
<datasources> <xa-datasource jndi-name="java:jboss/DB2XADS" pool-name="DB2XADS"> <xa-datasource-property name="ServerName"> localhost </xa-datasource-property> <xa-datasource-property name="DatabaseName"> ibmdb2db </xa-datasource-property> <xa-datasource-property name="PortNumber"> 50000 </xa-datasource-property> <xa-datasource-property name="DriverType"> 4 </xa-datasource-property> <driver>ibmdb2</driver> <xa-pool> <is-same-rm-override>false</is-same-rm-override> </xa-pool> <security> <user-name>admin</user-name> <password>admin</password> </security> <recovery> <recover-plugin class-name="org.jboss.jca.core.recovery.ConfigurableRecoveryPlugin"> <config-property name="EnableIsValid"> false </config-property> <config-property name="IsValidOverride"> false </config-property> <config-property name="EnableClose"> false </config-property> </recover-plugin> </recovery> <validation> <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.db2.DB2ValidConnectionChecker"/> <validate-on-match>true</validate-on-match> <background-validation>false</background-validation> <exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.db2.DB2ExceptionSorter"/> </validation> </xa-datasource> <drivers> <driver name="ibmdb2" module="com.ibm"> <xa-datasource-class>com.ibm.db2.jcc.DB2XADataSource</xa-datasource-class> </driver> </drivers> </datasources>
<?xml version="1.0" ?> <module xmlns="urn:jboss:module:1.1" name="com.ibm"> <resources> <resource-root path="db2jcc4.jar"/> </resources> <dependencies> <module name="javaee.api"/> <module name="sun.jdk"/> <module name="ibm.jdk"/> <module name="javax.api"/> <module name="javax.transaction.api"/> </dependencies> </module>
module add --name=com.ibm --resources= /path/to/db2jcc4.jar --dependencies=javaee.api,sun.jdk,ibm.jdk,javax.api,javax.transaction.api
/subsystem=datasources/jdbc-driver=ibmdb2:add(driver-name=ibmdb2,driver-module-name=com.ibm,driver-xa-datasource-class-name=com.ibm.db2.jcc.DB2XADataSource)
xa-data-source add --name=DB2XADS --jndi-name=java:jboss/DB2XADS --driver-name=ibmdb2 --user-name=admin --password=admin --validate-on-match=true --background-validation=false --background-validation=false --valid-connection-checker-class-name=org.jboss.jca.adapters.jdbc.extensions.db2.DB2ValidConnectionChecker --exception-sorter-class-name=org.jboss.jca.adapters.jdbc.extensions.db2.DB2ExceptionSorter --same-rm-override=false --recovery-plugin-class-name=org.jboss.jca.core.recovery.ConfigurableRecoveryPlugin --recovery-plugin-properties={"EnableIsValid"=>"false","IsValidOverride"=>"false","EnableClose"=>"false"} --xa-datasource-properties={"ServerName"=>"localhost","DatabaseName"=>"ibmdb2db","PortNumber"=>"50000","DriverType"=>"4"}
<datasources> <datasource jndi-name="java:jboss/SybaseDB" pool-name="SybaseDB"> <connection-url>jdbc:sybase:Tds:localhost:5000/DATABASE?JCONNECT_VERSION=6</connection-url> <driver>sybase</driver> <security> <user-name>admin</user-name> <password>admin</password> </security> <validation> <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.sybase.SybaseValidConnectionChecker"/> <validate-on-match>true</validate-on-match> <background-validation>false</background-validation> <exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.sybase.SybaseExceptionSorter"/> </validation> </datasource> <drivers> <driver name="sybase" module="com.sybase"> <xa-datasource-class>com.sybase.jdbc4.jdbc.SybXADataSource</xa-datasource-class> </driver> </drivers> </datasources>
<?xml version="1.0" ?> <module xmlns="urn:jboss:module:1.1" name="com.sybase"> <resources> <resource-root path="jconn4.jar"/> </resources> <dependencies> <module name="javaee.api"/> <module name="sun.jdk"/> <module name="ibm.jdk"/> <module name="javax.api"/> <module name="javax.transaction.api"/> </dependencies> </module>
module add --name=com.sybase --resources= /path/to/jconn4.jar --dependencies=javaee.api,sun.jdk,ibm.jdk,javax.api,javax.transaction.api
/subsystem=datasources/jdbc-driver=sybase:add(driver-name=sybase,driver-module-name=com.sybase,driver-xa-datasource-class-name=com.sybase.jdbc4.jdbc.SybXADataSource)
data-source add --name=SybaseDB --jndi-name=java:jboss/SybaseDB --driver-name=sybase --connection-url=jdbc:sybase:Tds:localhost:5000/DATABASE?JCONNECT_VERSION=6 --user-name=admin --password=admin --validate-on-match=true --background-validation=false --valid-connection-checker-class-name=org.jboss.jca.adapters.jdbc.extensions.sybase.SybaseValidConnectionChecker --exception-sorter-class-name=org.jboss.jca.adapters.jdbc.extensions.sybase.SybaseExceptionSorter
<datasources> <xa-datasource jndi-name="java:jboss/SybaseXADS" pool-name="SybaseXADS"> <xa-datasource-property name="ServerName"> localhost </xa-datasource-property> <xa-datasource-property name="DatabaseName"> mydatabase </xa-datasource-property> <xa-datasource-property name="PortNumber"> 4100 </xa-datasource-property> <xa-datasource-property name="NetworkProtocol"> Tds </xa-datasource-property> <driver>sybase</driver> <xa-pool> <is-same-rm-override>false</is-same-rm-override> </xa-pool> <security> <user-name>admin</user-name> <password>admin</password> </security> <validation> <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.sybase.SybaseValidConnectionChecker"/> <validate-on-match>true</validate-on-match> <background-validation>false</background-validation> <exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.sybase.SybaseExceptionSorter"/> </validation> </xa-datasource> <drivers> <driver name="sybase" module="com.sybase"> <xa-datasource-class>com.sybase.jdbc4.jdbc.SybXADataSource</xa-datasource-class> </driver> </drivers> </datasources>
<?xml version="1.0" ?> <module xmlns="urn:jboss:module:1.1" name="com.sybase"> <resources> <resource-root path="jconn4.jar"/> </resources> <dependencies> <module name="javaee.api"/> <module name="sun.jdk"/> <module name="ibm.jdk"/> <module name="javax.api"/> <module name="javax.transaction.api"/> </dependencies> </module>
module add --name=com.sybase --resources= /path/to/jconn4.jar --dependencies=javaee.api,sun.jdk,ibm.jdk,javax.api,javax.transaction.api
/subsystem=datasources/jdbc-driver=sybase:add(driver-name=sybase,driver-module-name=com.sybase,driver-xa-datasource-class-name=com.sybase.jdbc4.jdbc.SybXADataSource)
xa-data-source add --name=SybaseXADS --jndi-name=java:jboss/SybaseXADS --driver-name=sybase --user-name=admin --password=admin --validate-on-match=true --background-validation=false --background-validation=false --valid-connection-checker-class-name=org.jboss.jca.adapters.jdbc.extensions.sybase.SybaseValidConnectionChecker --exception-sorter-class-name=org.jboss.jca.adapters.jdbc.extensions.sybase.SybaseExceptionSorter --same-rm-override=false --xa-datasource-properties={"ServerName"=>"localhost","DatabaseName"=>"mydatabase","PortNumber"=>"4100","NetworkProtocol"=>"Tds"}
<datasources> <datasource jndi-name="java:jboss/MariaDBDS" pool-name="MariaDBDS"> <connection-url>jdbc:mariadb://localhost:3306/jbossdb</connection-url> <driver>mariadb</driver> <security> <user-name>admin</user-name> <password>admin</password> </security> <validation> <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLValidConnectionChecker"/> <validate-on-match>true</validate-on-match> <background-validation>false</background-validation> <exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLExceptionSorter"/> </validation> </datasource> <drivers> <driver name="mariadb" module="org.mariadb"> <driver-class>org.mariadb.jdbc.Driver</driver-class> <xa-datasource-class>org.mariadb.jdbc.MySQLDataSource</xa-datasource-class> </driver> </drivers> </datasources>
<?xml version="1.0" ?> <module xmlns="urn:jboss:module:1.1" name="org.mariadb"> <resources> <resource-root path="mariadb-java-client-3.3.0.jar"/> </resources> <dependencies> <module name="javaee.api"/> <module name="sun.jdk"/> <module name="ibm.jdk"/> <module name="javax.api"/> <module name="org.slf4j"/> <module name="javax.transaction.api"/> </dependencies> </module>
module add --name=org.mariadb --resources= /path/to/mariadb-java-client-3.3.0.jar --dependencies=javaee.api,sun.jdk,ibm.jdk,javax.api,javax.transaction.api,org.slf4j
/subsystem=datasources/jdbc-driver=mariadb:add(driver-name=mariadb,driver-module-name=org.mariadb,driver-xa-datasource-class-name=org.mariadb.jdbc.MySQLDataSource, driver-class-name=org.mariadb.jdbc.Driver)
data-source add --name=MariaDBDS --jndi-name=java:jboss/MariaDBDS --driver-name=mariadb --connection-url=jdbc:mariadb://localhost:3306/jbossdb --user-name=admin --password=admin --validate-on-match=true --background-validation=false --valid-connection-checker-class-name=org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLValidConnectionChecker --exception-sorter-class-name=org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLExceptionSorter
<datasources> <xa-datasource jndi-name="java:jboss/MariaDBXADS" pool-name="MariaDBXADS"> <xa-datasource-property name="ServerName"> localhost </xa-datasource-property> <xa-datasource-property name="DatabaseName"> mariadbdb </xa-datasource-property> <driver>mariadb</driver> <security> <user-name>admin</user-name> <password>admin</password> </security> <validation> <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLValidConnectionChecker"/> <validate-on-match>true</validate-on-match> <background-validation>false</background-validation> <exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLExceptionSorter"/> </validation> </xa-datasource> <drivers> <driver name="mariadb" module="org.mariadb"> <driver-class>org.mariadb.jdbc.Driver</driver-class> <xa-datasource-class>org.mariadb.jdbc.MySQLDataSource</xa-datasource-class> </driver> </drivers> </datasources>
<?xml version="1.0" ?> <module xmlns="urn:jboss:module:1.1" name="org.mariadb"> <resources> <resource-root path="mariadb-java-client-3.3.0.jar"/> </resources> <dependencies> <module name="javaee.api"/> <module name="sun.jdk"/> <module name="ibm.jdk"/> <module name="javax.api"/> <module name="org.slf4j"/> <module name="javax.transaction.api"/> </dependencies> </module>
module add --name=org.mariadb --resources= /path/to/mariadb-java-client-3.3.0.jar --dependencies=javaee.api,sun.jdk,ibm.jdk,javax.api,javax.transaction.api,org.slf4j
/subsystem=datasources/jdbc-driver=mariadb:add(driver-name=mariadb,driver-module-name=org.mariadb,driver-xa-datasource-class-name=org.mariadb.jdbc.MySQLDataSource, driver-class-name=org.mariadb.jdbc.Driver)
xa-data-source add --name=MariaDBXADS --jndi-name=java:jboss/MariaDBXADS --driver-name=mariadb --user-name=admin --password=admin --validate-on-match=true --background-validation=false --valid-connection-checker-class-name=org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLValidConnectionChecker --exception-sorter-class-name=org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLExceptionSorter --xa-datasource-properties={"ServerName"=>"localhost","DatabaseName"=>"mariadbdb"}
<datasources> <datasource jndi-name="java:jboss/MariaDBGaleraClusterDS" pool-name="MariaDBGaleraClusterDS"> <connection-url>jdbc:mariadb://192.168.1.1:3306,192.168.1.2:3306/jbossdb</connection-url> <driver>mariadb</driver> <security> <user-name>admin</user-name> <password>admin</password> </security> <validation> <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLValidConnectionChecker"/> <validate-on-match>true</validate-on-match> <background-validation>false</background-validation> <exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLExceptionSorter"/> </validation> </datasource> <drivers> <driver name="mariadb" module="org.mariadb"> <driver-class>org.mariadb.jdbc.Driver</driver-class> <xa-datasource-class>org.mariadb.jdbc.MySQLDataSource</xa-datasource-class> </driver> </drivers> </datasources>
<?xml version='1.0' encoding='UTF-8'?> <module xmlns="urn:jboss:module:1.1" name="org.mariadb"> <resources> <resource-root path="mariadb-java-client-3.3.0.jar"/> </resources> <dependencies> <module name="javaee.api"/> <module name="sun.jdk"/> <module name="ibm.jdk"/> <module name="javax.api"/> <module name="org.slf4j"/> <module name="javax.transaction.api"/> </dependencies> </module>
module add --name=org.mariadb --resources= /path/to/mariadb-java-client-3.3.0.jar --dependencies=javaee.api,sun.jdk,ibm.jdk,javax.api,javax.transaction.api,org.slf4j
/subsystem=datasources/jdbc-driver=mariadb:add(driver-name=mariadb,driver-module-name=org.mariadb,driver-xa-datasource-class-name=org.mariadb.jdbc.MySQLDataSource, driver-class-name=org.mariadb.jdbc.Driver)
data-source add --name=MariaDBGaleraClusterDS --jndi-name=java:jboss/MariaDBGaleraClusterDS --driver-name=mariadb --connection-url=jdbc:mariadb://192.168.1.1:3306,192.168.1.2:3306/jbossdb --user-name=admin --password=admin --validate-on-match=true --background-validation=false --valid-connection-checker-class-name=org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLValidConnectionChecker --exception-sorter-class-name=org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLExceptionSorter
/extension=org.wildfly.extension.datasources-agroal:add
/subsystem=datasources-agroal:add
reload
<server xmlns="urn:jboss:domain:8.0"> <extensions> <extension module="org.wildfly.extension.datasources-agroal"/> </extensions> <subsystem xmlns="urn:jboss:domain:datasources-agroal:1.0"/> </server>
EAP_HOME /bin/jboss-cli.sh
[disconnected /] module add --name= MODULE_NAME --resources= PATH_TO_JDBC_JAR --dependencies= DEPENDENCIES
[disconnected /] module add --name=com.mysql --resources= /path/to /mysql-connector-java-8.0.12.jar --dependencies=javax.transaction.api,sun.jdk,ibm.jdk,javaee.api,javax.api
EAP_HOME /bin/jboss-cli.sh --command="module add --name= MODULE_NAME --resources= PATH_TO_JDBC_JAR --dependencies= DEPENDENCIES "
/subsystem=datasources-agroal/driver= DRIVER_NAME :add(module= MODULE_NAME ,class= CLASS_NAME )
/subsystem=datasources-agroal/datasource= DATASOURCE_NAME :add(jndi-name= JNDI_NAME ,connection-factory={driver= DRIVER_NAME ,url= URL },connection-pool={max-size= MAX_POOL_SIZE })
/subsystem=datasources-agroal/datasource= DATASOURCE_NAME :remove
/subsystem=datasources-agroal/xa-datasource= XA_DATASOURCE_NAME :add(jndi-name= JNDI_NAME ,connection-factory={driver= DRIVER_NAME ,connection-properties={ServerName= HOST_NAME ,PortNumber= PORT ,DatabaseName= DATABASE_NAME }},connection-pool={max-size= MAX_POOL_SIZE })
/subsystem=datasources-agroal/xa-datasource= DATASOURCE_NAME :remove
<subsystem xmlns="urn:jboss:domain:datasources-agroal:1.0"> <datasource name="ExampleAgroalDS" jndi-name="java:jboss/datasources/ExampleAgroalDS"> <connection-factory driver="mysql" url="jdbc:mysql://localhost:3306/jbossdb" username="admin" password="admin"/> <connection-pool max-size="30"/> </datasource> <drivers> <driver name="mysql" module="com.mysql" class="com.mysql.cj.jdbc.Driver"/> </drivers> </subsystem>
<?xml version='1.0' encoding='UTF-8'?> <module xmlns="urn:jboss:module:1.1" name="com.mysql"> <resources> <resource-root path="mysql-connector-java-8.0.12.jar"/> </resources> <dependencies> <module name="javaee.api"/> <module name="sun.jdk"/> <module name="ibm.jdk"/> <module name="javax.api"/> <module name="javax.transaction.api"/> </dependencies> </module>
module add --name=com.mysql --resources= /path/to/mysql-connector-java-8.0.12.jar --dependencies=javaee.api,sun.jdk,ibm.jdk,javax.api,javax.transaction.api
/subsystem=datasources-agroal/driver=mysql:add(module=com.mysql,class=com.mysql.cj.jdbc.Driver)
/subsystem=datasources-agroal/datasource=ExampleAgroalDS:add(jndi-name=java:jboss/datasources/ExampleAgroalDS,connection-factory={driver=mysql,url=jdbc:mysql://localhost:3306/jbossdb,username=admin,password=admin},connection-pool={max-size=30})
<subsystem xmlns="urn:jboss:domain:datasources-agroal:1.0"> <xa-datasource name="ExampleAgroalXADS" jndi-name="java:jboss/datasources/ExampleAgroalXADS"> <connection-factory driver="mysqlXA" username="admin" password="admin"> <connection-properties> <property name="ServerName" value="localhost"/> <property name="PortNumber" value="3306"/> <property name="DatabaseName" value="jbossdb"/> </connection-properties> </connection-factory> <connection-pool max-size="30"/> </xa-datasource> <drivers> <driver name="mysqlXA" module="com.mysql" class="com.mysql.cj.jdbc.MysqlXADataSource"/> </drivers> </subsystem>
<?xml version='1.0' encoding='UTF-8'?> <module xmlns="urn:jboss:module:1.1" name="com.mysql"> <resources> <resource-root path="mysql-connector-java-8.0.12.jar"/> </resources> <dependencies> <module name="javaee.api"/> <module name="sun.jdk"/> <module name="ibm.jdk"/> <module name="javax.api"/> <module name="javax.transaction.api"/> </dependencies> </module>
module add --name=com.mysql --resources= /path/to/mysql-connector-java-8.0.12.jar --dependencies=javaee.api,sun.jdk,ibm.jdk,javax.api,javax.transaction.api
/subsystem=datasources-agroal/driver=mysqlXA:add(module=com.mysql,class=com.mysql.cj.jdbc.MysqlXADataSource)
/subsystem=datasources-agroal/xa-datasource=ExampleAgroalXADS:add(jndi-name=java:jboss/datasources/ExampleAgroalXADS,connection-factory={driver=mysqlXA,connection-properties={ServerName=localhost,PortNumber=3306,DatabaseName=jbossdb},username=admin,password=admin},connection-pool={max-size=30})
/profile=full/subsystem=iiop-openjdk:write-attribute(name=security,value=identity)
/profile=full/subsystem=iiop-openjdk:write-attribute(name=transactions, value=full)
/profile=full/subsystem=transactions:write-attribute(name=jts,value=true)
/subsystem=iiop-openjdk:read-attribute(name=security-domain) { "outcome" => "success", "result" => "iiopSSLSecurityDomain" }
/subsystem=iiop-openjdk:undefine-attribute(name=security-realm)
batch /subsystem=iiop-openjdk:write-attribute(name=client-ssl-context,value=iiopClientSSC) /subsystem=iiop-openjdk:write-attribute(name=server-ssl-context,value=iiopServerSSC) run-batch reload
/subsystem=iiop-openjdk:write-attribute(name=support-ssl,value=true) /subsystem=iiop-openjdk:write-attribute(name=client-requires-ssl,value=true) /subsystem=iiop-openjdk:write-attribute(name=server-requires-ssl,value=true) /subsystem=iiop-openjdk:write-attribute(name=ssl-socket-binding,value=iiop-ssl) reload
Severity: ERROR Section: 19.4.2 Description: A ResourceAdapter must implement a "public int hashCode()" method. Code: com.mycompany.myproject.ResourceAdapterImpl Severity: ERROR Section: 19.4.2 Description: A ResourceAdapter must implement a "public boolean equals(Object)" method. Code: com.mycompany.myproject.ResourceAdapterImpl
batch /subsystem=jca/distributed-workmanager=myDistWorkMgr:add(name=myDistWorkMgr) /subsystem=jca/distributed-workmanager=myDistWorkMgr/short-running-threads=myDistWorkMgr:add(queue-length=10,max-threads=10) /subsystem=jca/bootstrap-context=myCustomContext:add(name=myCustomContext,workmanager=myDistWorkMgr) run-batch
/subsystem=jca/distributed-workmanager=myDistWorkMgr:write-attribute(name=policy-options,value={watermark=3})
deploy /path/to /resource-adapter.rar
deploy /path/to /resource-adapter.rar --all-server-groups
/subsystem=resource-adapters/resource-adapter=eis.rar:add(archive=eis.rar, transaction-support=XATransaction)
/subsystem=resource-adapters/resource-adapter=eis.rar/config-properties=server:add(value=localhost)
/subsystem=resource-adapters/resource-adapter=eis.rar/config-properties=port:add(value=9000)
/subsystem=resource-adapters/resource-adapter=eis.rar/admin-objects=aoName:add(class-name=com.acme.eis.ra.EISAdminObjectImpl, jndi-name=java:/eis/AcmeAdminObject)
/subsystem=resource-adapters/resource-adapter=eis.rar/admin-objects=aoName/config-properties=threshold:add(value=10)
/subsystem=resource-adapters/resource-adapter=eis.rar/connection-definitions=cfName:add(class-name=com.acme.eis.ra.EISManagedConnectionFactory, jndi-name=java:/eis/AcmeConnectionFactory)
/subsystem=resource-adapters/resource-adapter=eis.rar/connection-definitions=cfName/config-properties=name:add(value=Acme Inc)
/subsystem=resource-adapters/resource-adapter=eis.rar/connection-definitions=cfName:write-attribute(name=enlistment-trace,value=true)
/subsystem=resource-adapters/resource-adapter=eis.rar:activate
/subsystem=resource-adapters/resource-adapter= RAR_NAME /connection-definitions= FACTORY_NAME :write-attribute(name=elytron-enabled,value=true)
/subsystem=elytron/authentication-configuration=exampleAuthConfig:add(authentication-name=sa,credential-reference={clear-text=sa})
/subsystem=elytron/authentication-context=exampleAuthContext:add(match-rules=[{authentication-configuration=exampleAuthConfig}])
/subsystem=jca/workmanager=customWM:add(name=customWM, elytron-enabled=true)
<subsystem xmlns="urn:jboss:domain:jca:5.0"> <archive-validation enabled="true" fail-on-error="true" fail-on-warn="false"/> <bean-validation enabled="true"/> <default-workmanager> <short-running-threads> <core-threads count="50"/> <queue-length count="50"/> <max-threads count="50"/> <keepalive-time time="10" unit="seconds"/> </short-running-threads> <long-running-threads> <core-threads count="50"/> <queue-length count="50"/> <max-threads count="50"/> <keepalive-time time="10" unit="seconds"/> </long-running-threads> </default-workmanager> <workmanager name="customWM"> <elytron-enabled>true</elytron-enabled> <short-running-threads> <core-threads count="20"/> <queue-length count="20"/> <max-threads count="20"/> </short-running-threads> </workmanager> <bootstrap-contexts> <bootstrap-context name="customContext" workmanager="customWM"/> </bootstrap-contexts> <cached-connection-manager/> </subsystem>
<subsystem xmlns="urn:jboss:domain:resource-adapters:5.0"> <resource-adapters> <resource-adapter id="ra-with-elytron-security-domain"> <archive> ra-with-elytron-security-domain.rar </archive> <bootstrap-context>customContext</bootstrap-context> <transaction-support>NoTransaction</transaction-support> <workmanager> <security> <elytron-security-domain>wm-realm</elytron-security-domain> <default-principal>wm-default-principal</default-principal> <default-groups> <group> wm-default-group </group> </default-groups> </security> </workmanager> </resource-adapter> </resource-adapters> </subsystem>
/subsystem=elytron/properties-realm=wm-properties-realm:add(users-properties={path=/security-dir/users.properties, plain-text=true}, groups-properties={path=/security-dir/groups.properties}) /subsystem=elytron/simple-role-decoder=wm-role-decoder:add(attribute=groups) /subsystem=elytron/constant-permission-mapper=wm-permission-mapper:add(permissions=[{class-name="org.wildfly.security.auth.permission.LoginPermission"}]) /subsystem=elytron/security-domain=wm-realm:add(default-realm=wm-properties-realm, permission-mapper=wm-permission-mapper, realms=[{role-decoder=wm-role-decoder, realm=wm-properties-realm}])
public interface WorkContextProvider { /** * Gets an instance of <code>WorkContexts</code> that needs to be used * by the <code>WorkManager</code> to set up the execution context while * executing a <code>Work</code> instance. * * @return an <code>List</code> of <code>WorkContext</code> instances. */ List<WorkContext> getWorkContexts(); }
public class ExampleWork implements Work, WorkContextProvider { private final String username; private final String role; public MyWork(TestBean bean, String username, String role) { this.principals = null; this.roles = null; this.bean = bean; this.username = username; this.role = role; } public List<WorkContext> getWorkContexts() { List<WorkContext> l = new ArrayList<>(1); l.add(new MySecurityContext(username, role)); return l; } public void run() { } public void release() { } public class ExampleSecurityContext extends SecurityContext { public void setupSecurityContext(CallbackHandler handler, Subject executionSubject, Subject serviceSubject) { try { List<javax.security.auth.callback.Callback> cbs = new ArrayList<>(); cbs.add(new CallerPrincipalCallback(executionSubject, new SimplePrincipal(username))); cbs.add(new GroupPrincipalCallback(executionSubject, new String[]{role})); handler.handle(cbs.toArray(new javax.security.auth.callback.Callback[cbs.size()])); } catch (Throwable t) { throw new RuntimeException(t); } } }
/subsystem=datasources/data-source= DATA_SOURCE :write-attribute(name=mcp,value= MCP_CLASS )
/subsystem=resource-adapters/resource-adapter= RESOURCE_ADAPTER /connection-definitions= CONNECTION_DEFINITION :write-attribute(name=mcp,value= MCP_CLASS )
/subsystem=messaging-activemq/server= SERVER /pooled-connection-factory= CONNECTION_FACTORY :write-attribute(name=managed-connection-pool,value= MCP_CLASS )
/deployment= NAME .rar/subsystem=resource-adapters/statistics=statistics/connection-definitions=java\:\/testMe:read-resource(include-runtime=true)
/subsystem=resource-adapters/resource-adapter= RESOURCE_ADAPTER /connection-definitions= CONNECTION_DEFINITION :flush-all-connection-in-pool
/subsystem=resource-adapters/resource-adapter= RESOURCE_ADAPTER /connection-definitions= CONNECTION_DEFINITION :flush-gracefully-connection-in-pool
/subsystem=resource-adapters/resource-adapter= RESOURCE_ADAPTER /connection-definitions= CONNECTION_DEFINITION :flush-idle-connection-in-pool
/subsystem=resource-adapters/resource-adapter= RESOURCE_ADAPTER /connection-definitions= CONNECTION_DEFINITION :flush-invalid-connection-in-pool
<subsystem xmlns="urn:jboss:domain:undertow:10.0" default-server="default-server" default-virtual-host="default-host" default-servlet-container="default" default-security-domain="other"> <buffer-cache name="default"/> <server name="default-server"> <http-listener name="default" socket-binding="http" redirect-socket="https" enable-http2="true"/> <https-listener name="https" socket-binding="https" security-realm="ApplicationRealm" enable-http2="true"/> <host name="default-host" alias="localhost"> <location name="/" handler="welcome-content"/> <http-invoker security-realm="ApplicationRealm"/> </host> </server> <servlet-container name="default"> <jsp-config/> <websockets/> </servlet-container> <handlers> <file name="welcome-content" path="USD{jboss.home.dir}/welcome-content"/> </handlers> </subsystem>
/subsystem=undertow/application-security-domain=ApplicationDomain:add(security-domain=ApplicationDomain)
<subsystem xmlns="urn:jboss:domain:undertow:10.0" ... default-security-domain="other"> <application-security-domains> <application-security-domain name="ApplicationDomain" security-domain="ApplicationDomain"/> </application-security-domains> </subsystem>
/subsystem=undertow/application-security-domain=MyAppSecurity:add(http-authentication-factory=application-http-authentication)
<subsystem xmlns="urn:jboss:domain:undertow:10.0" ... default-security-domain="other"> <application-security-domains> <application-security-domain name="MyAppSecurity" http-authentication-factory="application-http-authentication"/> </application-security-domains> </subsystem>
/subsystem=undertow/application-security-domain=MyAppSecurity:read-resource(include-runtime=true) { "outcome" => "success", "result" => { "enable-jacc" => false, "http-authentication-factory" => undefined, "override-deployment-config" => false, "referencing-deployments" => ["simple-webapp.war"], "security-domain" => "ApplicationDomain", "setting" => undefined } }
<subsystem xmlns="urn:jboss:domain:undertow:10.0" default-server="default-server" default-virtual-host="default-host" default-servlet-container="default" default-security-domain="other"> <buffer-cache name="default"/> </subsystem>
/subsystem=undertow/buffer-cache=default/:write-attribute(name=buffer-size,value=2048)
reload
/subsystem=undertow/buffer-cache=new-buffer:add
/subsystem=undertow/buffer-cache=new-buffer:remove
reload
/subsystem=undertow/byte-buffer-pool=myByteBufferPool:write-attribute(name=buffer-size,value=1024)
reload
/subsystem=undertow/byte-buffer-pool=newByteBufferPool:add
/subsystem=undertow/byte-buffer-pool=newByteBufferPool:remove
reload
<subsystem xmlns="urn:jboss:domain:undertow:10.0" default-server="default-server" default-virtual-host="default-host" default-servlet-container="default" default-security-domain="other"> <buffer-cache name="default"/> <server name="default-server"> <http-listener name="default" socket-binding="http" redirect-socket="https" enable-http2="true"/> <https-listener name="https" socket-binding="https" security-realm="ApplicationRealm" enable-http2="true"/> <host name="default-host" alias="localhost"> <location name="/" handler="welcome-content"/> <http-invoker security-realm="ApplicationRealm"/> </host> </server> </subsystem>
/subsystem=undertow/server=default-server:write-attribute(name=default-host,value=default-host)
reload
/subsystem=undertow/server=new-server:add
reload
/subsystem=undertow/server=new-server:remove
reload
/subsystem=undertow/server=default-server/host=default-host/setting=access-log:add
/subsystem=undertow/server=default-server/host=default-host/setting=access-log:write-attribute(name=pattern,value="combined"
/subsystem=undertow/server=default-server/host=default-host/setting=console-access-log:add
/subsystem=undertow/server=default-server/host=default-host/setting=console-access-log:add(metadata={"@version"="1", "qualifiedHostName"=USD{jboss.qualified.host.name:unknown}}, attributes={bytes-sent={}, date-time={key="@timestamp", date-format="yyyy-MM-dd'T'HH:mm:ssSSS"}, remote-host={}, request-line={}, response-header={key-prefix="responseHeader", names=["Content-Type"]}, response-code={}, remote-user={}})
eventSource: web-access
hostName: default-host
@version: 1
qualifiedHostName: localhost.localdomain
bytesSent: 1504
@timestamp: 2019-05-02T11:57:37123
remoteHost: 127.0.0.1
requestLine: GET / HTTP/2.0
responseCode: 200
responseHeaderContent-Type: text/html
/subsystem=undertow/server=default-server/host=default-host/setting=console-access-log:write-attribute(name=attributes,value={bytes-sent={}, date-time={key="@timestamp", date-format="yyyy-MM-dd'T'HH:mm:ssSSS"}, remote-host={}, request-line={}, response-header={key-prefix="responseHeader", names=["Content-Type"]}, response-code={}, remote-user={}})
/subsystem=undertow/server=default-server/host=default-host/setting=console-access-log:write-attribute(name=metadata,value={"@version"="1", "qualifiedHostName"=USD{jboss.qualified.host.name:unknown}})
<subsystem xmlns="urn:jboss:domain:undertow:10.0"> <buffer-cache name="default"/> <server name="default-server"> </server> <servlet-container name="default"> <jsp-config/> <websockets/> </servlet-container> </subsystem>
/subsystem=undertow/servlet-container=default:write-attribute(name=ignore-flush,value=true)
reload
/subsystem=undertow/servlet-container=new-servlet-container:add
reload
/subsystem=undertow/servlet-container=new-servlet-container:remove
reload
<subsystem xmlns="urn:jboss:domain:undertow:10.0" default-server="default-server" default-virtual-host="default-host" default-servlet-container="default" default-security-domain="other"> <buffer-cache name="default"/> <server name="default-server"> </server> <servlet-container name="default"> </servlet-container> <handlers> <file name="welcome-content" path="USD{jboss.home.dir}/welcome-content"/> </handlers> </subsystem>
/subsystem=undertow/configuration=handler/file=welcome-content:write-attribute(name=case-sensitive,value=true)
reload
/subsystem=undertow/configuration=handler/file=new-file-handler:add(path="USD{jboss.home.dir}/welcome-content")
/subsystem=undertow/configuration=handler/file=new-file-handler:remove
reload
/subsystem=undertow/configuration=filter/response-header=myHeader:write-attribute(name=header-value,value="JBoss-EAP")
reload
/subsystem=undertow/configuration=filter/response-header=new-response-header:add(header-name=new-response-header,header-value="My Value")
/subsystem=undertow/configuration=filter/response-header=new-response-header:remove
reload
/subsystem=undertow/configuration=filter/expression-filter=buf:add(expression="buffer-request(buffers=1)") /subsystem=undertow/server=default-server/host=default-host/filter-ref=buf:add
/subsystem=undertow/configuration=filter/expression-filter=addSameSiteLax:add(expression="path-prefix('/mypathprefix') -> samesite-cookie(Lax)")
/subsystem=undertow/server=default-server/host=default-host/filter-ref=addSameSiteLax:add
samesite-cookie(mode=<mode>)
<subsystem xmlns="urn:jboss:domain:undertow:10.0" default-server="default-server" default-virtual-host="default-host" default-servlet-container="default" default-security-domain="other"> <server name="default-server"> <http-listener name="default" socket-binding="http" redirect-socket="https" enable-http2="true"/> <https-listener name="https" socket-binding="https" security-realm="ApplicationRealm" enable-http2="true"/> <host name="default-host" alias="localhost"> <location name="/" handler="welcome-content"/> <http-invoker security-realm="ApplicationRealm"/> </host> </server> <handlers> <file name="welcome-content" path="USD{jboss.home.dir}/welcome-content"/> </handlers> </subsystem>
/subsystem=undertow/configuration=handler/file=welcome-content:write-attribute(name=path,value=" /path/to/content ")
/subsystem=undertow/configuration=handler/file= NEW_FILE_HANDLER :add(path=" /path/to/content ") /subsystem=undertow/server=default-server/host=default-host/location=\/:write-attribute(name=handler,value= NEW_FILE_HANDLER )
reload
/subsystem=undertow/server=default-server/host=default-host:write-attribute(name=default-web-module,value=hello.war)
reload
/subsystem=undertow/server=default-server/host=default-host/location=\/:remove
reload
/subsystem=undertow/servlet-container=default:write-attribute(name=default-session-timeout, value=60)
reload
/subsystem=undertow/servlet-container=default/setting=session-cookie:add
/subsystem=undertow/servlet-container=default/setting=session-cookie:write-attribute(name=http-only,value=true)
reload
/subsystem=undertow/server=default-server/host=default-host/setting=single-sign-on:add
/subsystem=undertow/server=default-server/host=default-host/setting=single-sign-on:write-attribute(name=http-only,value=true)
reload
/subsystem=undertow/server=default-server/http-listener=default:write-attribute(name=enable-http2,value=true)
/subsystem=undertow/server=default-server/https-listener=https:write-attribute(name=enable-http2,value=true)
/subsystem=undertow/configuration=filter/expression-filter=requestDumperExpression:add(expression="dump-request")
/subsystem=undertow/server=default-server/host=default-host/filter-ref=requestDumperExpression:add
dump-request
path(/test) -> dump-request
<subsystem xmlns="urn:jboss:domain:remoting:4.0"> <endpoint/> <http-connector name="http-remoting-connector" connector-ref="default" security-realm="ApplicationRealm"/> </subsystem>
<subsystem xmlns="urn:jboss:domain:remoting:4.0"> <endpoint/> </subsystem>
/subsystem=remoting/configuration=endpoint:write-attribute(name=authentication-retries,value=2)
reload
/subsystem=remoting/configuration=endpoint:add
/subsystem=remoting/configuration=endpoint:remove
reload
/subsystem=remoting/connector=new-connector:write-attribute(name=socket-binding,value=my-socket-binding)
reload
/subsystem=remoting/connector=new-connector:add(socket-binding=my-socket-binding)
/subsystem=remoting/connector=new-connector:remove
reload
<subsystem xmlns="urn:jboss:domain:remoting:4.0"> <http-connector name="http-remoting-connector" connector-ref="default" security-realm="ApplicationRealm"/> </subsystem>
/subsystem=remoting/http-connector=new-connector:write-attribute(name=connector-ref,value=new-connector-ref)
reload
/subsystem=remoting/http-connector=new-connector:add(connector-ref=default)
/subsystem=remoting/http-connector=new-connector:remove
/subsystem=remoting/outbound-connection=new-outbound-connection:write-attribute(name=uri,value=http://example.com)
/subsystem=remoting/outbound-connection=new-outbound-connection:add(uri=http://example.com)
/subsystem=remoting/outbound-connection=new-outbound-connection:remove
/subsystem=remoting/remote-outbound-connection=new-remote-outbound-connection:write-attribute(name=outbound-socket-binding-ref,value=outbound-socket-binding)
/subsystem=remoting/remote-outbound-connection=new-remote-outbound-connection:add(outbound-socket-binding-ref=outbound-socket-binding)
/subsystem=remoting/remote-outbound-connection=new-remote-outbound-connection:remove
/subsystem=remoting/local-outbound-connection=new-local-outbound-connection:write-attribute(name=outbound-socket-binding-ref,value=outbound-socket-binding)
/subsystem=remoting/local-outbound-connection=new-local-outbound-connection:add(outbound-socket-binding-ref=outbound-socket-binding)
/subsystem=remoting/local-outbound-connection=new-local-outbound-connection:remove
/subsystem=remoting/configuration=endpoint:write-attribute(name=worker, value= WORKER_NAME )
<interfaces> <interface name="management"> <inet-address value="USD{jboss.bind.address.management:127.0.0.1}"/> </interface> <interface name="public"> <inet-address value="USD{jboss.bind.address:127.0.0.1}"/> </interface> <interface name="unsecure"> <inet-address value="USD{jboss.bind.address.unsecure:127.0.0.1}"/> </interface> </interfaces>
<subsystem xmlns="urn:jboss:domain:io:3.0"> <worker name="default"/> <buffer-pool name="default"/> </subsystem>
/subsystem=io/worker=default:write-attribute(name=io-threads,value=10)
reload
/subsystem=io/worker=newWorker:add
/subsystem=io/worker=newWorker:remove
reload
/subsystem=io/buffer-pool=default:write-attribute(name=direct-buffers,value=true)
reload
/subsystem=io/buffer-pool=newBuffer:add
/subsystem=io/buffer-pool=newBuffer:remove
reload
cd EAP_HOME /modules/ mkdir -p com/sun/jsf-impl/ IMPL_NAME - VERSION
cd EAP_HOME /modules/ mkdir -p javax/faces/api/ IMPL_NAME - VERSION
cd EAP_HOME /modules/ mkdir -p org/jboss/as/jsf-injection/ IMPL_NAME - VERSION
cd EAP_HOME /modules/ mkdir -p org/apache/commons/digester/main
/subsystem=jsf:write-attribute(name=default-jsf-impl-slot,value= IMPL_NAME - VERSION )
<context-param> <param-name>org.jboss.jbossfaces. JSF_CONFIG_NAME </param-name> <param-value>myfaces-2.2.12</param-value> </context-param>
/subsystem=jsf:write-attribute(name=default-jsf-impl-slot,value= JSF_IMPLEMENTATION )
reload
/subsystem=jsf:list-active-jsf-impls { "outcome" => "success", "result" => [ "myfaces-2.1.12", "mojarra-2.2.0-m05", "main" ] }
/subsystem=jsf:write-attribute(name=disallow-doctype-decl,value=true) reload
<context-param> <param-name>com.sun.faces.disallowDoctypeDecl</param-name> <param-value>false</param-value> </context-param>
<subsystem xmlns="urn:jboss:domain:batch-jberet:2.0"> <default-job-repository name="in-memory"/> <default-thread-pool name="batch"/> <job-repository name="in-memory"> <in-memory/> </job-repository> <thread-pool name="batch"> <max-threads count="10"/> <keepalive-time time="30" unit="seconds"/> </thread-pool> </subsystem>
/subsystem=batch-jberet:write-attribute(name=restart-jobs-on-resume,value=false)
/subsystem=batch-jberet/in-memory-job-repository= REPOSITORY_NAME :add
/subsystem=batch-jberet/jdbc-job-repository= REPOSITORY_NAME :add(data-source= DATASOURCE )
/subsystem=batch-jberet:write-attribute(name=default-job-repository,value= REPOSITORY_NAME )
reload
/subsystem=batch-jberet/thread-pool= THREAD_POOL_NAME :add(max-threads=10)
/subsystem=batch-jberet/thread-pool= THREAD_POOL_NAME :write-attribute(name=keepalive-time,value={time=60,unit=SECONDS})
/subsystem=batch-jberet/thread-factory= THREAD_FACTORY_NAME :add
/subsystem=batch-jberet/thread-pool= THREAD_POOL_NAME :write-attribute(name=thread-factory,value= THREAD_FACTORY_NAME )
reload
/subsystem=batch-jberet:write-attribute(name=default-thread-pool,value= THREAD_POOL_NAME )
reload
/subsystem=batch-jberet/thread-pool= THREAD_POOL_NAME :read-resource(include-runtime=true) { "outcome" => "success", "result" => { "active-count" => 0, "completed-task-count" => 0L, "current-thread-count" => 0, "keepalive-time" => undefined, "largest-thread-count" => 0, "max-threads" => 15, "name" => " THREAD_POOL_NAME ", "queue-size" => 0, "rejected-count" => 0, "task-count" => 0L, "thread-factory" => " THREAD_FACTORY_NAME " } }
/deployment= DEPLOYMENT_NAME /subsystem=batch-jberet:restart-job(execution-id= EXECUTION_ID ,properties={ PROPERTY = VALUE })
/deployment= DEPLOYMENT_NAME /subsystem=batch-jberet:start-job(job-xml-name= JOB_XML_NAME ,properties={ PROPERTY = VALUE })
/deployment= DEPLOYMENT_NAME /subsystem=batch-jberet:stop-job(execution-id= EXECUTION_ID )
/deployment= DEPLOYMENT_NAME /subsystem=batch-jberet:read-resource(recursive=true,include-runtime=true) { "outcome" => "success", "result" => {"job" => {"import-file" => { "instance-count" => 2, "running-executions" => 0, "execution" => { "2" => { "batch-status" => "COMPLETED", "create-time" => "2016-04-11T22:03:12.708-0400", "end-time" => "2016-04-11T22:03:12.718-0400", "exit-status" => "COMPLETED", "instance-id" => 58L, "last-updated-time" => "2016-04-11T22:03:12.719-0400", "start-time" => "2016-04-11T22:03:12.708-0400" }, "1" => { "batch-status" => "FAILED", "create-time" => "2016-04-11T21:57:17.567-0400", "end-time" => "2016-04-11T21:57:17.596-0400", "exit-status" => "Error : org.hibernate.exception.ConstraintViolationException: could not execute statement", "instance-id" => 15L, "last-updated-time" => "2016-04-11T21:57:17.597-0400", "start-time" => "2016-04-11T21:57:17.567-0400" } } }}} }
/subsystem=batch-jberet:write-attribute(name=security-domain, value=ExampleDomain) reload
<subsystem xmlns="urn:jboss:domain:naming:2.0"> <bindings> <simple name="java:global/simple-integer-binding" value="100" type="int" /> <simple name="java:global/jboss.org/docs/url" value="https://docs.jboss.org" type="java.net.URL" /> <object-factory name="java:global/foo/bar/factory" module="org.foo.bar" class="org.foo.bar.ObjectFactory" /> <external-context name="java:global/federation/ldap/example" class="javax.naming.directory.InitialDirContext" cache="true"> <environment> <property name="java.naming.factory.initial" value="com.sun.jndi.ldap.LdapCtxFactory" /> <property name="java.naming.provider.url" value="ldap://ldap.example.com:389" /> <property name="java.naming.security.authentication" value="simple" /> <property name="java.naming.security.principal" value="uid=admin,ou=system" /> <property name="java.naming.security.credentials" value="secret" /> </environment> </external-context> <lookup name="java:global/new-alias-name" lookup="java:global/original-name" /> </bindings> <remote-naming/> </subsystem>
/subsystem=naming/binding=java\:global\/simple-integer-binding:add(binding-type=simple, type=int, value=100)
<subsystem xmlns="urn:jboss:domain:naming:2.0"> <bindings> <simple name="java:global/simple-integer-binding" value="100" type="int"/> </bindings> <remote-naming/> </subsystem>
/subsystem=naming/binding=java\:global\/simple-integer-binding:remove
/subsystem=naming/binding=java\:global\/foo\/bar\/factory:add(binding-type=object-factory, module=org.foo.bar, class=org.foo.bar.ObjectFactory, environment=[p1=v1, p2=v2])
<subsystem xmlns="urn:jboss:domain:naming:2.0"> <bindings> <object-factory name="java:global/foo/bar/factory" module="org.foo.bar" class="org.foo.bar.ObjectFactory"> <environment> <property name="p1" value="v1" /> <property name="p2" value="v2" /> </environment> </object-factory> </bindings> </subsystem>
/subsystem=naming/binding=java\:global\/foo\/bar\/factory:remove
/subsystem=naming/binding=java\:global\/federation\/ldap\/example:add(binding-type=external-context, cache=true, class=javax.naming.directory.InitialDirContext, module=org.jboss.as.naming, environment=[java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory, java.naming.provider.url="ldap://ldap.example.com:389", java.naming.security.authentication=simple, java.naming.security.principal="uid=admin,ou=system", java.naming.security.credentials=secret])
<subsystem xmlns="urn:jboss:domain:naming:2.0"> <bindings> <external-context name="java:global/federation/ldap/example" module="org.jboss.as.naming" class="javax.naming.directory.InitialDirContext" cache="true"> <environment> <property name="java.naming.factory.initial" value="com.sun.jndi.ldap.LdapCtxFactory"/> <property name="java.naming.provider.url" value="ldap://ldap.example.com:389"/> <property name="java.naming.security.authentication" value="simple"/> <property name="java.naming.security.principal" value="uid=admin,ou=system"/> <property name="java.naming.security.credentials" value="secret"/> </environment> </external-context> </bindings> </subsystem>
/subsystem=naming/binding=java\:global\/federation\/ldap\/example:remove
<property name="org.jboss.as.naming.lookup.by.string" value="true"/>
/subsystem=naming/binding=java\:global\/new-alias-name:add(binding-type=lookup, lookup=java\:global\/original-name)
<lookup name="java:global/new-alias-name" lookup="java:global/original-name" />
/subsystem=naming/binding=java\:global\/c:remove
/subsystem=naming/binding=java\:global\/simple-integer-binding:rebind(binding-type=simple, type=int, value=200)
/subsystem=naming/service=remote-naming:add
/subsystem=naming/service=remote-naming:remove
<channels default="ee"> <channel name="ee" stack="udp"/> </channels> <stacks> <stack name="udp"> <transport type="UDP" socket-binding="jgroups-udp"/> <protocol type="PING"/> </stack> <stack name="tcp"> <transport type="TCP" socket-binding="jgroups-tcp"/> <protocol type="MPING" socket-binding="jgroups-mping"/> </stack> </stacks>
/subsystem=jgroups/channel=ee:write-attribute(name=stack,value=tcp)
<channel name="ee" stack="tcp" cluster="ejb"/>
<server xmlns="urn:jboss:domain:8.0" name="node_1">
<servers> <server name="server-one" group="main-server-group"/> <server name="server-two" group="other-server-group"> <socket-bindings port-offset="150"/> </server> </servers>
Define the socket bindings /socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=jgroups-host-a:add(host= HOST_A ,port=7600) /socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=jgroups-host-b:add(host= HOST_B ,port=7600) batch Add the tcpping stack /subsystem=jgroups/stack=tcpping:add /subsystem=jgroups/stack=tcpping/transport=TCP:add(socket-binding=jgroups-tcp) /subsystem=jgroups/stack=tcpping/protocol=TCPPING:add(socket-bindings=[jgroups-host-a,jgroups-host-b]) /subsystem=jgroups/stack=tcpping/protocol=MERGE3:add /subsystem=jgroups/stack=tcpping/protocol=FD_SOCK:add /subsystem=jgroups/stack=tcpping/protocol=FD_ALL:add /subsystem=jgroups/stack=tcpping/protocol=VERIFY_SUSPECT:add /subsystem=jgroups/stack=tcpping/protocol=pbcast.NAKACK2:add /subsystem=jgroups/stack=tcpping/protocol=UNICAST3:add /subsystem=jgroups/stack=tcpping/protocol=pbcast.STABLE:add /subsystem=jgroups/stack=tcpping/protocol=pbcast.GMS:add /subsystem=jgroups/stack=tcpping/protocol=MFC:add /subsystem=jgroups/stack=tcpping/protocol=FRAG3:add Set tcpping as the stack for the ee channel /subsystem=jgroups/channel=ee:write-attribute(name=stack,value=tcpping) run-batch reload
/subsystem=jgroups/stack=tcpping/protocol=UNICAST3:add(add-index=6)
EAP_HOME /bin/jboss-cli.sh --connect --file= /path/to/SCRIPT_NAME
<channel name="ee" stack="tcp" cluster="ejb"/>
<stack name="tcp"> <transport type="TCP" socket-binding="jgroups-tcp"/> <protocol type="TCPPING"> <property name="initial_hosts">192.168.1.5[7600],192.168.1.9[7600]</property> <property name="port_range">0</property> </protocol> <protocol type="MERGE3"/> <protocol type="FD_SOCK" socket-binding="jgroups-tcp-fd"/> <protocol type="FD_ALL"/> <protocol type="VERIFY_SUSPECT"/> <protocol type="pbcast.NAKACK2"/> <protocol type="UNICAST3"/> <protocol type="pbcast.STABLE"/> <protocol type="pbcast.GMS"/> <protocol type="MFC"/> <protocol type="FRAG3"/> </stack>
<interface name="private"> <inet-address value="USD{jboss.bind.address.private:192.168.1.5}"/> </interface>
INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (thread-2,ee,node_1) ISPN000094: Received new cluster view for channel server: [node_1|1] (2) [node_1, node_2] INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (thread-2,ee,node_1) ISPN000094: Received new cluster view for channel web: [node_1|1] (2) [node_1, node_2]
<protocol type="TCPPING"> <property name="initial_hosts">USD{jboss.cluster.tcp.initial_hosts}</property> Set the system property at the `server-group` level: <server-groups> <server-group name="a-server-group" profile="ha"> <socket-binding-group ref="ha-sockets"/> <system-properties> <property name="jboss.cluster.tcp.initial_hosts" value="192.168.1.5[7600],192.168.1.9[7600]" /> </system-properties>
<interfaces> . <interface name="private"> <inet-address value="USD{jboss.bind.address.private:192.168.1.5}"/> </interface> </interfaces>
INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (thread-2,ee,node_1) ISPN000094: Received new cluster view for channel server: [node_1|1] (2) [node_1, node_2] INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (thread-2,ee,node_1) ISPN000094: Received new cluster view for channel web: [node_1|1] (2) [node_1, node_2]
Define the socket bindings /socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=jgroups-host-a:add(host= HOST_A ,port=13001) batch Add the tcpgossip stack /subsystem=jgroups/stack=tcpgossip:add /subsystem=jgroups/stack=tcpgossip/transport=TCP:add(socket-binding=jgroups-tcp) /subsystem=jgroups/stack=tcpgossip/protocol=TCPGOSSIP:add(socket-bindings=[jgroups-host-a]) /subsystem=jgroups/stack=tcpgossip/protocol=MERGE3:add /subsystem=jgroups/stack=tcpgossip/protocol=FD_SOCK:add /subsystem=jgroups/stack=tcpgossip/protocol=FD_ALL:add /subsystem=jgroups/stack=tcpgossip/protocol=VERIFY_SUSPECT:add /subsystem=jgroups/stack=tcpgossip/protocol=pbcast.NAKACK2:add /subsystem=jgroups/stack=tcpgossip/protocol=UNICAST3:add /subsystem=jgroups/stack=tcpgossip/protocol=pbcast.STABLE:add /subsystem=jgroups/stack=tcpgossip/protocol=pbcast.GMS:add /subsystem=jgroups/stack=tcpgossip/protocol=MFC:add /subsystem=jgroups/stack=tcpgossip/protocol=FRAG3:add Set tcpgossip as the stack for the ee channel /subsystem=jgroups/channel=ee:write-attribute(name=stack,value=tcpgossip) run-batch reload
/subsystem=jgroups/stack=tcpgossip/protocol=UNICAST3:add(add-index=6)
EAP_HOME /bin/jboss-cli.sh --connect --file= /path/to/SCRIPT_NAME
batch Add the JDBC_PING stack /subsystem=jgroups/stack=JDBC_PING:add /subsystem=jgroups/stack=JDBC_PING/transport=TCP:add(socket-binding=jgroups-tcp) /subsystem=jgroups/stack=JDBC_PING/protocol=JDBC_PING:add(data-source= ExampleDS ) /subsystem=jgroups/stack=JDBC_PING/protocol=MERGE3:add /subsystem=jgroups/stack=JDBC_PING/protocol=FD_SOCK:add /subsystem=jgroups/stack=JDBC_PING/protocol=FD_ALL:add /subsystem=jgroups/stack=JDBC_PING/protocol=VERIFY_SUSPECT:add /subsystem=jgroups/stack=JDBC_PING/protocol=pbcast.NAKACK2:add /subsystem=jgroups/stack=JDBC_PING/protocol=UNICAST3:add /subsystem=jgroups/stack=JDBC_PING/protocol=pbcast.STABLE:add /subsystem=jgroups/stack=JDBC_PING/protocol=pbcast.GMS:add /subsystem=jgroups/stack=JDBC_PING/protocol=MFC:add /subsystem=jgroups/stack=JDBC_PING/protocol=FRAG3:add Set JDBC_PING as the stack for the ee channel /subsystem=jgroups/channel=ee:write-attribute(name=stack,value=JDBC_PING) run-batch reload
/subsystem=jgroups/stack=JDBC_PING/protocol=UNICAST3:add(add-index=6)
EAP_HOME /bin/jboss-cli.sh --connect --file= /path/to/SCRIPT_NAME
<protocol type="pbcast.STABLE"/> <auth-protocol type="AUTH"> <plain-token> <shared-secret-reference clear-text=" my_password "/> </plain-token> </auth-protocol> <protocol type="pbcast.GMS"/>
<protocol type="pbcast.STABLE"/> <auth-protocol type="AUTH"> <digest-token algorithm="SHA-512"> <shared-secret-reference clear-text=" my_password "/> </digest-token> </auth-protocol> <protocol type="pbcast.GMS"/>
keytool -genkeypair -alias jgroups_key -keypass my_password -storepass my_password -storetype jks -keystore jgroups.keystore -keyalg RSA
/subsystem=elytron/key-store=jgroups-token-store:add(type=jks,path=/path/to/jgroups.keystore,credential-reference={clear-text=my_password}, required=true)
<protocol type="pbcast.STABLE"/> <auth-protocol type="AUTH"> <cipher-token algorithm="RSA" key-alias="jgroups_key" key-store="jgroups-token-store"> <shared-secret-reference clear-text="my_password"/> <key-credential-reference clear-text="my_password"/> </cipher-token> </auth-protocol> <protocol type="pbcast.GMS"/>
java -cp EAP_HOME /modules/system/layers/base/org/jgroups/main/jgroups- VERSION .jar org.jgroups.demos.KeyStoreGenerator --alg AES --size 128 --storeName defaultStore.keystore --storepass PASSWORD --alias mykey
<subsystem xmlns="urn:jboss:domain:jgroups:6.0"> <stacks> <stack name="udp"> <transport type="UDP" socket-binding="jgroups-udp"/> <protocol type="PING"/> <protocol type="MERGE3"/> <protocol type="FD_SOCK"/> <protocol type="FD_ALL"/> <protocol type="VERIFY_SUSPECT"/> <protocol type="SYM_ENCRYPT"> <property name="provider">SunJCE</property> <property name="sym_algorithm">AES</property> <property name="encrypt_entire_message">true</property> <property name="keystore_name"> /path/to/defaultStore.keystore </property> <property name="store_password"> PASSWORD </property> <property name="alias">mykey</property> </protocol> <protocol type="pbcast.NAKACK2"/> <protocol type="UNICAST3"/> <protocol type="pbcast.STABLE"/> <protocol type="pbcast.GMS"/> <protocol type="UFC"/> <protocol type="MFC"/> <protocol type="FRAG3"/> </stack> </stacks> </subsystem>
/subsystem=elytron/key-store=jgroups-keystore:add(path=/path/to/defaultStore.keystore,credential-reference={clear-text= PASSWORD },type=JCEKS)
<subsystem xmlns="urn:jboss:domain:jgroups:6.0"> <stacks> <stack name="udp"> <transport type="UDP" socket-binding="jgroups-udp"/> <protocol type="PING"/> <protocol type="MERGE3"/> <protocol type="FD_SOCK"/> <protocol type="FD_ALL"/> <protocol type="VERIFY_SUSPECT"/> <encrypt-protocol type="SYM_ENCRYPT" key-alias="mykey" key-store="jgroups-keystore"> <key-credential-reference clear-text=" PASSWORD "/> <property name="provider">SunJCE</property> <property name="encrypt_entire_message">true</property> </encrypt-protocol> <protocol type="pbcast.NAKACK2"/> <protocol type="UNICAST3"/> <protocol type="pbcast.STABLE"/> <protocol type="pbcast.GMS"/> <protocol type="UFC"/> <protocol type="MFC"/> <protocol type="FRAG3"/> </stack> </stacks> </subsystem>
<subsystem xmlns="urn:jboss:domain:jgroups:6.0"> <stacks> <stack name="udp"> <transport type="UDP" socket-binding="jgroups-udp"/> <protocol type="PING"/> <protocol type="MERGE3"/> <protocol type="FD_SOCK"/> <protocol type="FD_ALL"/> <protocol type="VERIFY_SUSPECT"/> <protocol type="ASYM_ENCRYPT"> <property name="encrypt_entire_message">true</property> <property name="sym_keylength">128</property> <property name="sym_algorithm">AES/ECB/PKCS5Padding</property> <property name="asym_keylength">512</property> <property name="asym_algorithm">RSA</property> </protocol> <protocol type="pbcast.NAKACK2"/> <protocol type="UNICAST3"/> <protocol type="pbcast.STABLE"/> <!-- Configure AUTH protocol here --> <protocol type="pbcast.GMS"/> <protocol type="UFC"/> <protocol type="MFC"/> <protocol type="FRAG3"/> </stack> </stacks> </subsystem>
keytool -genkeypair -alias mykey -keyalg RSA -keysize 1024 -keystore defaultKeystore.keystore -dname "CN=localhost" -keypass secret -storepass secret
/subsystem=elytron/key-store=jgroups-keystore:add(path=/path/to/defaultStore.keystore,credential-reference={clear-text= PASSWORD },type=JCEKS)
<subsystem xmlns="urn:jboss:domain:jgroups:6.0"> <stacks> <stack name="udp"> <transport type="UDP" socket-binding="jgroups-udp"/> <protocol type="PING"/> <protocol type="MERGE3"/> <protocol type="FD_SOCK"/> <protocol type="FD_ALL"/> <protocol type="VERIFY_SUSPECT"/> <encrypt-protocol type="ASYM_ENCRYPT" key-alias="mykey" key-store="jgroups-keystore"> <key-credential-reference clear-text="secret" /> <property name="encrypt_entire_message">true</property> </encrypt-protocol> <protocol type="pbcast.NAKACK2"/> <protocol type="UNICAST3"/> <protocol type="pbcast.STABLE"/> <!-- Configure AUTH protocol here --> <protocol type="pbcast.GMS"/> <protocol type="UFC"/> <protocol type="MFC"/> <protocol type="FRAG3"/> </stack> </stacks> </subsystem>
/subsystem=jgroups/stack= STACK_TYPE /transport= TRANSPORT_TYPE /thread-pool= THREAD_POOL_NAME :write-attribute(name= ATTRIBUTE_NAME , value= ATTRIBUTE_VALUE )
/subsystem=jgroups/stack=udp/transport=UDP/thread-pool=default:write-attribute(name="max-threads", value="500")
WARNING [org.jgroups.protocols.UDP] (ServerService Thread Pool -- 68) JGRP000015: the send buffer of socket DatagramSocket was set to 640KB, but the OS only allocated 212.99KB. This might lead to performance problems. Please set your max send buffer in the OS correctly (e.g. net.core.wmem_max on Linux) WARNING [org.jgroups.protocols.UDP] (ServerService Thread Pool -- 68) JGRP000015: the receive buffer of socket DatagramSocket was set to 20MB, but the OS only allocated 212.99KB. This might lead to performance problems. Please set your max receive buffer in the OS correctly (e.g. net.core.rmem_max on Linux)
Allow a 25MB UDP receive buffer for JGroups net.core.rmem_max = 26214400 Allow a 1MB UDP send buffer for JGroups net.core.wmem_max = 1048576
/subsystem=jgroups/stack= STACK_NAME /transport= TRANSPORT /property= PROPERTY_NAME :add(value= BUFFER_SIZE )
/subsystem=jgroups/stack=tcp/transport= TRANSPORT /property=recv_buf_size:add(value=20000000)
java -cp EAP_HOME /bin/client/jboss-client.jar org.jgroups.tests.McastReceiverTest -mcast_addr 230.11.11.11 -port 5555
java -cp EAP_HOME /bin/client/jboss-client.jar org.jgroups.tests.McastSenderTest -mcast_addr 230.11.11.11 -port 5555
<subsystem xmlns="urn:jboss:domain:infinispan:7.0"> <cache-container name="server" aliases="singleton cluster" default-cache="default" module="org.wildfly.clustering.server"> <transport lock-timeout="60000"/> <replicated-cache name="default"> <transaction mode="BATCH"/> </replicated-cache> </cache-container> <cache-container name="web" default-cache="dist" module="org.wildfly.clustering.web.infinispan"> <transport lock-timeout="60000"/> <distributed-cache name="dist"> <locking isolation="REPEATABLE_READ"/> <transaction mode="BATCH"/> <file-store/> </distributed-cache> </cache-container> <cache-container name="ejb" aliases="sfsb" default-cache="dist" module="org.wildfly.clustering.ejb.infinispan"> <transport lock-timeout="60000"/> <distributed-cache name="dist"> <locking isolation="REPEATABLE_READ"/> <transaction mode="BATCH"/> <file-store/> </distributed-cache> </cache-container> <cache-container name="hibernate" default-cache="local-query" module="org.hibernate.infinispan"> <transport lock-timeout="60000"/> <local-cache name="local-query"> <object-memory size="1000"/> <expiration max-idle="100000"/> </local-cache> <invalidation-cache name="entity"> <transaction mode="NON_XA"/> <object-memory size="1000"/> <expiration max-idle="100000"/> </invalidation-cache> <replicated-cache name="timestamps" mode="ASYNC"/> </cache-container> </subsystem>
/subsystem=infinispan/cache-container= CACHE_CONTAINER :add
/subsystem=infinispan/cache-container= CACHE_CONTAINER /replicated-cache= CACHE :add(mode= MODE )
/subsystem=infinispan/cache-container= CACHE_CONTAINER :write-attribute(name=default-cache,value= CACHE )
/subsystem=infinispan/cache-container= CACHE_CONTAINER /replicated-cache= CACHE /component=transaction:write-attribute(name=mode,value=BATCH)
batch /subsystem=infinispan/cache-container=web/distributed-cache=concurrent:add /subsystem=infinispan/cache-container=web:write-attribute(name=default-cache,value=concurrent) /subsystem=infinispan/cache-container=web/distributed-cache=concurrent/store=file:add run-batch
<cache-container name="web" default-cache="concurrent" module="org.wildfly.clustering.web.infinispan"> <distributed-cache name="concurrent"> <file-store/> </distributed-cache> </cache-container>
<subsystem xmlns="urn:jboss:domain:ejb3:5.0"> <passivation-stores> <passivation-store name="infinispan" cache-container="ejb-cltest" max-size="10000"/> </passivation-stores> <remote cluster="ejb-cltest" connectors="http-remoting-connector" thread-pool-name="default"/> </subsystem> <subsystem xmlns="urn:jboss:domain:infinispan:7.0"> <cache-container name="ejb-cltest" aliases="sfsb" default-cache="dist" module="org.wildfly.clustering.ejb.infinispan"> </subsystem>
@Resource(lookup = "java:jboss/infinispan/cache/foo/bar") private org.infinispan.Cache<Integer, Object> cache;
@Resource(lookup = "java:jboss/infinispan/cache/foo/default")
@Resource(lookup = "java:jboss/infinispan/container/foo") private org.infinispan.manager.EmbeddedCacheManager manager;
@Resource(lookup = "java:jboss/infinispan/configuration/foo/bar") private org.infinispan.config.Configuration config;
@Resource(lookup = "java:jboss/infinispan/configuration/foo/default") private org.infinispan.config.Configuration config;
<cache-container name="hibernate" default-cache="local-query" module="org.hibernate.infinispan"> <transport lock-timeout="60000"/> <local-cache name="local-query"> <object-memory size="1000"/> <expiration max-idle="100000"/>
batch /subsystem=infinispan/cache-container=web/replicated-cache=repl:add() /subsystem=infinispan/cache-container=web/replicated-cache=repl/component=transaction:add(mode=BATCH) /subsystem=infinispan/cache-container=web/replicated-cache=repl/component=locking:add(isolation=REPEATABLE_READ) /subsystem=infinispan/cache-container=web/replicated-cache=repl/store=file:add /subsystem=infinispan/cache-container=web:write-attribute(name=default-cache,value=repl) run-batch
reload
/subsystem=infinispan/cache-container=web:write-attribute(name=default-cache,value=dist)
/subsystem=infinispan/cache-container=web/distributed-cache=dist:write-attribute(name=owners,value=5)
reload
/subsystem=infinispan/cache-container=web/scattered-cache=scattered:add(bias-lifespan=1800000)
/subsystem=infinispan/cache-container=web:write-attribute(name=default-cache,value=scattered)
<cache-container name="web" default-cache="scattered" module="org.wildfly.clustering.web.infinispan"> <scattered-cache name="scattered" bias-lifespan="1800000"/> </cache-container>
/subsystem=infinispan/cache-container=server/ CACHE_TYPE = CACHE /component=state-transfer:write-attribute(name=timeout,value=0)
/subsystem=infinispan/cache-container= CACHE_CONTAINER_NAME /thread-pool= THREAD_POOL_NAME :write-attribute(name= ATTRIBUTE_NAME , value= ATTRIBUTE_VALUE )
/subsystem=infinispan/cache-container=server/thread-pool=persistence:write-attribute(name="max-threads", value="10")
/subsystem=infinispan/cache-container= CACHE_CONTAINER :write-attribute(name=statistics-enabled,value=true)
/subsystem=infinispan/cache-container= CACHE_CONTAINER / CACHE_TYPE = CACHE :write-attribute(name=statistics-enabled,value=true)
/subsystem=infinispan/cache-container= CACHE_CONTAINER / CACHE_TYPE = CACHE :undefine-attribute(name=statistics-enabled)
/subsystem=infinispan/cache-container=web/distributed-cache=dist/component=partition-handling:write-attribute(name=enabled, value=true)
/socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding= SOCKET_BINDING :add(host= HOSTNAME ,port= PORT )
batch /subsystem=infinispan/remote-cache-container= CACHE_CONTAINER :add(default-remote-cluster=data-grid-cluster) /subsystem=infinispan/remote-cache-container= CACHE_CONTAINER /remote-cluster=data-grid-cluster:add(socket-bindings=[ SOCKET_BINDING , SOCKET_BINDING_2 ,...]) run-batch
/subsystem=infinispan/remote-cache-container=foo:write-attribute(name=statistics-enabled, value=true)
/subsystem=infinispan/remote-cache-container=foo:read-attribute(name=connections) /subsystem=infinispan/remote-cache-container=foo:read-attribute(name=active-connections) /subsystem=infinispan/remote-cache-container=foo:read-attribute(name=idle-connections)
/subsystem=infinispan/remote-cache-container=foo:read-resource-description
/subsystem=infinispan/remote-cache-container=foo/remote-cache=bar.war:read-resource(include-runtime=true, recursive=true) { "average-read-time" : 1, "average-remove-time" : 0, "average-write-time" : 2, "hits" : 9, "misses" : 0, "near-cache-hits" : 7, "near-cache-invalidations" : 8, "near-cache-misses" : 9, "near-cache-size" : 1, "removes" : 0, "time-since-reset" : 82344, "writes" : 8 }
/subsystem=infinispan/remote-cache-container=foo/remote-cache=bar.war:read-resource-description
/subsystem=infinispan/remote-cache-container=foo/remote-cache=bar.war:reset-statistics()
batch /subsystem=infinispan/cache-container=web/invalidation-cache= CACHE_NAME :add() /subsystem=infinispan/cache-container=web/invalidation-cache= CACHE_NAME /store=hotrod:add(remote-cache-container= CACHE_CONTAINER ,fetch-state=false,purge=false,passivation=false,shared=true) /subsystem=infinispan/cache-container=web/invalidation-cache= CACHE_NAME /component=transaction:add(mode=BATCH) /subsystem=infinispan/cache-container=web/invalidation-cache= CACHE_NAME /component=locking:add(isolation=REPEATABLE_READ) /subsystem=infinispan/cache-container=web:write-attribute(name=default-cache,value= CACHE_NAME ) run-batch
@Resource(lookup = "java:jboss/infinispan/remote-container/web-sessions") private org.infinispan.client.hotrod.RemoteCacheContainer client;
infinispan.client.hotrod.transport_factory = org.infinispan.client.hotrod.impl.transport.tcp.TcpTransportFactory infinispan.client.hotrod.server_list = 127.0.0.1:11222 infinispan.client.hotrod.marshaller = org.infinispan.commons.marshall.jboss.GenericJBossMarshaller infinispan.client.hotrod.async_executor_factory = org.infinispan.client.hotrod.impl.async.DefaultAsyncExecutorFactory infinispan.client.hotrod.default_executor_factory.pool_size = 1 infinispan.client.hotrod.default_executor_factory.queue_size = 10000 infinispan.client.hotrod.hash_function_impl.1 = org.infinispan.client.hotrod.impl.consistenthash.ConsistentHashV1 infinispan.client.hotrod.tcp_no_delay = true infinispan.client.hotrod.ping_on_startup = true infinispan.client.hotrod.request_balancing_strategy = org.infinispan.client.hotrod.impl.transport.tcp.RoundRobinBalancingStrategy infinispan.client.hotrod.key_size_estimate = 64 infinispan.client.hotrod.value_size_estimate = 512 infinispan.client.hotrod.force_return_values = false ## below is connection pooling config maxActive=-1 maxTotal = -1 maxIdle = -1 whenExhaustedAction = 1 timeBetweenEvictionRunsMillis=120000 minEvictableIdleTimeMillis=300000 testWhileIdle = true minIdle = 1
/subsystem=elytron/client-ssl-context= CLIENT_SSL_CONTEXT :add(key-manager= KEY_MANAGER ,trust-manager= TRUST_MANAGER )
/subsystem=infinispan/remote-cache-container= CACHE_CONTAINER /component=security:write-attribute(name=ssl-context,value= CLIENT_SSL_CONTEXT )
/core-service=management/security-realm=ApplicationRealm/server-identity=ssl:add(keystore-path=" KEYSTORE_NAME ",keystore-relative-to="jboss.server.config.dir",keystore-password=" KEYSTORE_PASSWORD ")
/subsystem=datagrid-infinispan-endpoint/hotrod-connector=hotrod-connector/encryption=ENCRYPTION:add(require-ssl-client-auth=false,security-realm="ApplicationRealm")
reload
/socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=remote-rhdg-server1:add(host=RHDGHostName1, port=11222) /socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=remote-rhdg-server2:add(host=RHDGHostName2, port=11222)
<socket-binding-group name="standard-sockets" ... > <outbound-socket-binding name="remote-rhdg-server1"> <remote-destination host="RHDGHostName1" port="11222"/> </outbound-socket-binding> <outbound-socket-binding name="remote-rhdg-server2"> <remote-destination host="RHDGHostName2" port="11222"/> </outbound-socket-binding> </socket-binding-group>
/subsystem=infinispan/cache-container=web/invalidation-cache=rhdg:add(mode=SYNC) /subsystem=infinispan/cache-container=web/invalidation-cache=rhdg/component=locking:write-attribute(name=isolation,value=REPEATABLE_READ) /subsystem=infinispan/cache-container=web/invalidation-cache=rhdg/component=transaction:write-attribute(name=mode,value=BATCH) /subsystem=infinispan/cache-container=web/invalidation-cache=rhdg/store=remote:add(remote-servers=["remote-rhdg-server1","remote-rhdg-server2"], cache=default, socket-timeout=60000, passivation=false, purge=false, shared=true)
<subsystem xmlns="urn:jboss:domain:infinispan:7.0"> <cache-container name="web" default-cache="dist" module="org.wildfly.clustering.web.infinispan" statistics-enabled="true"> <transport lock-timeout="60000"/> <invalidation-cache name="rhdg" mode="SYNC"> <locking isolation="REPEATABLE_READ"/> <transaction mode="BATCH"/> <remote-store cache="default" socket-timeout="60000" remote-servers="remote-rhdg-server1 remote-rhdg-server2" passivation="false" purge="false" shared="true"/> </invalidation-cache> </cache-container> </subsystem>
<?xml version="1.0" encoding="UTF-8"?> <jboss-web xmlns="http://www.jboss.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-web_10_0.xsd" version="10.0"> <replication-config> <replication-granularity>SESSION</replication-granularity> <cache-name>web.rhdg</cache-name> </replication-config> </jboss-web>
/profile=ha/subsystem=modcluster/proxy=default:write-attribute(name=advertise-security-key, value=mypassword)
/profile=load-balancer/subsystem=undertow/configuration=filter/mod-cluster=load-balancer:write-attribute(name=security-key,value=mypassword)
/socket-binding-group=standard-sockets/socket-binding=ajp-other:add(port=8010) /subsystem=undertow/server=other-server:add /subsystem=undertow/server=other-server/ajp-listener=ajp-other:add(socket-binding=ajp-other) /subsystem=undertow/server=other-server/host=other-host:add(default-web-module=root-other.war) /subsystem=undertow/server=other-server/host=other-host /location=other:add(handler=welcome-content) /subsystem=undertow/server=other-server/host=other-host:write-attribute(name=alias,value=[localhost])) /socket-binding-group=standard-sockets/socket-binding=modcluster-other:add(multicast-address=224.0.1.106,multicast-port=23364) /subsystem=modcluster/proxy=other:add(advertise-socket=modcluster-other,balancer=other-balancer,connector=ajp-other) reload
/subsystem=undertow/configuration=filter/mod-cluster=load-balancer/affinity=ranked:add
/subsystem=undertow/configuration=filter/mod-cluster=load-balancer/affinity=ranked:write-attribute(name=delimiter,value=':')
/subsystem=undertow/configuration=handler/reverse-proxy=my-handler:add
/socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=remote-host1/:add(host=server1.example.com, port=8009) /socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=remote-host2/:add(host=server2.example.com, port=8009)
/subsystem=undertow/configuration=handler/reverse-proxy=my-handler/host=host1:add(outbound-socket-binding=remote-host1, scheme=ajp, instance-id=myroute1, path=/test) /subsystem=undertow/configuration=handler/reverse-proxy=my-handler/host=host2:add(outbound-socket-binding=remote-host2, scheme=ajp, instance-id=myroute2, path=/test)
/subsystem=undertow/server=default-server/host=default-host/location=\/test:add(handler=my-handler)
/subsystem=undertow:write-attribute(name=instance-id,value=node1)
/subsystem=undertow/server=default-server:read-resource
/socket-binding-group=standard-sockets/socket-binding=ajp:add(port=8009)
/subsystem=undertow/server=default-server/ajp-listener=ajp:add(socket-binding=ajp)
mod_proxy_balancer should be disabled when mod_cluster is used LoadModule proxy_cluster_module modules/mod_proxy_cluster.so LoadModule cluster_slotmem_module modules/mod_cluster_slotmem.so LoadModule manager_module modules/mod_manager.so LoadModule advertise_module modules/mod_advertise.so MemManagerFile cache/mod_cluster <IfModule manager_module> Listen 6666 <VirtualHost *:6666> <Directory /> Require ip 127.0.0.1 </Directory> ServerAdvertise on EnableMCPMReceive <Location /mod_cluster_manager> SetHandler mod_cluster-manager Require ip 127.0.0.1 </Location> </VirtualHost> </IfModule>
ServerAdvertise Off
AdvertiseFrequency 5
EnableMCPMReceive
/profile=full-ha/subsystem=modcluster/proxy=default:write-attribute(name=advertise,value=false)
/socket-binding-group=full-ha-sockets/remote-destination-outbound-socket-binding=proxy1:add(host=10.33.144.3,port=6666) /socket-binding-group=full-ha-sockets/remote-destination-outbound-socket-binding=proxy2:add(host=10.33.144.1,port=6666)
/profile=full-ha/subsystem=modcluster/proxy=default:list-add(name=proxies,value=proxy1) /profile=full-ha/subsystem=modcluster/proxy=default:list-add(name=proxies,value=proxy2)
/interface=management:write-attribute(name=inet-address,value="USD{jboss.bind.address.management: EXTERNAL_IP_ADDRESS }") /interface=public:write-attribute(name=inet-address,value="USD{jboss.bind.address.public: EXTERNAL_IP_ADDRESS }") /interface=unsecure:write-attribute(name=inet-address,value="USD{jboss.bind.address.unsecure: EXTERNAL_IP_ADDRESS }")
reload
EAP_HOME /bin/domain.sh --host-config=host-slave.xml
/host= EXISTING_HOST_NAME :write-attribute(name=name,value=slave1)
EAP_HOME /bin/domain.sh --host-config=host-slave.xml
/host= SLAVE_HOST_NAME :write-remote-domain-controller(host= DOMAIN_CONTROLLER_IP_ADDRESS ,port=USD{jboss.domain.master.port:9990},security-realm="ManagementRealm")
<domain-controller> <remote host=" DOMAIN_CONTROLLER_IP_ADDRESS " port="USD{jboss.domain.master.port:9990}" security-realm="ManagementRealm"/> </domain-controller>
EAP_HOME /bin/add-user.sh What type of user do you wish to add? a) Management User (mgmt-users.properties) b) Application User (application-users.properties) (a): a Username : slave1 Password : changeme Re-enter Password : changeme What groups do you want this user to belong to? (Please enter a comma separated list, or leave blank for none)[ ]: About to add user 'slave1' for realm 'ManagementRealm' Is this correct yes/no? yes Is this new user going to be used for one AS process to connect to another AS process? e.g. for a slave host controller connecting to the master or for a Remoting connection for server to server {JEB} calls. yes/no? yes To represent the user add the following to the server-identities definition <secret value=" SECRET_VALUE " />
/host= SLAVE_HOST_NAME /core-service=management/security-realm=ManagementRealm/server-identity=secret:add(value=" SECRET_VALUE ")
reload --host= HOST_NAME
/host= SLAVE_HOST_NAME /core-service=management/security-realm=ManagementRealm/server-identity=secret:add(credential-reference={store= STORE_NAME ,alias= ALIAS }
reload --host= HOST_NAME
VAULT::secret::password::ODVmYmJjNGMtZDU2ZC00YmNlLWE4ODMtZjQ1NWNmNDU4ZDc1TElORV9CUkVBS3ZhdWx0.
/host=master/core-service=management/security-realm=ManagementRealm/server-identity=secret:add(value="USD{VAULT::secret::password:: VAULT_SECRET_VALUE }")
reload --host= HOST_NAME
/host= SLAVE_HOST_NAME /core-service=management/security-realm=ManagementRealm/server-identity=secret:add(value="USD{server.identity.password}")
reload --host=master
EAP_HOME /bin/domain.sh --host-config=host-slave.xml -Dserver.identity.password=changeme
server.identity.password=changeme
EAP_HOME /bin/domain.sh --host-config=host-slave.xml --properties= PATH_TO_PROPERTIES_FILE
ProxyPass / balancer://MyBalancer stickysession=JSESSIONID|jsessionid nofailover=on failonstatus=203,204 ProxyPassReverse / balancer://MyBalancer ProxyPreserveHost on
/profile=full-ha/subsystem=modcluster/proxy=default:write-attribute(name=sticky-session,value=true)
/profile=full-ha/subsystem=modcluster/proxy=default:write-attribute(name=load-balancing-group,value=ClusterOLD)
mod_cluster/<version> LBGroup ClusterOLD: [Enable Nodes] [Disable Nodes] [Stop Nodes] Node node-1-jvmroute (ajp://node1.oldcluster.example:8009): [Enable Contexts] [Disable Contexts] [Stop Contexts] Balancer: qacluster, LBGroup: ClusterOLD, Flushpackets: Off, ..., Load: 100 Virtual Host 1: Contexts: /my-deployed-application-context, Status: ENABLED Request: 0 [Disable] [Stop] Node node-2-jvmroute (ajp://node2.oldcluster.example:8009): [Enable Contexts] [Disable Contexts] [Stop Contexts] Balancer: qacluster, LBGroup: ClusterOLD, Flushpackets: Off, ..., Load: 100 Virtual Host 1: Contexts: /my-deployed-application-context, Status: ENABLED Request: 0 [Disable] [Stop] LBGroup ClusterNEW: [Enable Nodes] [Disable Nodes] [Stop Nodes] Node node-3-jvmroute (ajp://node3.newcluster.example:8009): [Enable Contexts] [Disable Contexts] [Stop Contexts] Balancer: qacluster, LBGroup: ClusterNEW, Flushpackets: Off, ..., Load: 100 Virtual Host 1: Contexts: /my-deployed-application-context, Status: ENABLED Request: 0 [Disable] [Stop] Node node-4-jvmroute (ajp://node4.newcluster.example:8009): [Enable Contexts] [Disable Contexts] [Stop Contexts] Balancer: qacluster, LBGroup: ClusterNEW, Flushpackets: Off, ..., Load: 100 Virtual Host 1: Contexts: /my-deployed-application-context, Status: ENABLED Request: 0 [Disable] [Stop]
/host=master/server=server-one/subsystem=modcluster:stop-context(context=/my-deployed-application-context, virtualhost=default-host, waittime=0)
/host=master/server=server-one/subsystem=modcluster:disable-context(context=/my-deployed-application-context, virtualhost=default-host)
Load mod_jk module Specify the filename of the mod_jk lib LoadModule jk_module modules/mod_jk.so Where to find workers.properties JkWorkersFile conf.d/workers.properties Where to put jk logs JkLogFile logs/mod_jk.log Set the jk log level [debug/error/info] JkLogLevel info Select the log format JkLogStampFormat "[%a %b %d %H:%M:%S %Y]" JkOptions indicates to send SSK KEY SIZE JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories JkRequestLogFormat JkRequestLogFormat "%w %V %T" Mount your applications JkMount /application/* loadbalancer Add shared memory. This directive is present with 1.2.10 and later versions of mod_jk, and is needed for for load balancing to work properly JkShmFile logs/jk.shm Add jkstatus for managing runtime data <Location /jkstatus/> JkMount status Require ip 127.0.0.1 </Location>
Define list of workers that will be used for mapping requests worker.list=loadbalancer,status Define Node1 modify the host as your host IP or DNS name. worker.node1.port=8009 worker.node1.host=node1.mydomain.com worker.node1.type=ajp13 worker.node1.ping_mode=A worker.node1.lbfactor=1 Define Node2 modify the host as your host IP or DNS name. worker.node2.port=8009 worker.node2.host=node2.mydomain.com worker.node2.type=ajp13 worker.node2.ping_mode=A worker.node2.lbfactor=1 Load-balancing behavior worker.loadbalancer.type=lb worker.loadbalancer.balance_workers=node1,node2 worker.loadbalancer.sticky_session=1 Status worker for managing load balancer worker.status.type=status
Simple worker configuration file /*=loadbalancer
Use external file for mount points. It will be checked for updates each 60 seconds. The format of the file is: /url=worker /examples/*=loadbalancer JkMountFile conf.d/uriworkermap.properties
<VirtualHost *:80> Your domain name ServerName YOUR_DOMAIN_NAME ProxyPreserveHost On The IP and port of JBoss These represent the default values, if your httpd is on the same host as your JBoss managed domain or server ProxyPass / http://localhost:8080/ ProxyPassReverse / http://localhost:8080/ The location of the HTML files, and access control information DocumentRoot /var/www <Directory /var/www> Options -Indexes Order allow,deny Allow from all </Directory> </VirtualHost>
<Proxy balancer://mycluster> Order deny,allow Allow from all Add each JBoss Enterprise Application Server by IP address and port. If the route values are unique like this, one node will not fail over to the other. BalancerMember http://192.168.1.1:8080 route=node1 BalancerMember http://192.168.1.2:8180 route=node2 </Proxy> <VirtualHost *:80> # Your domain name ServerName YOUR_DOMAIN_NAME ProxyPreserveHost On ProxyPass / balancer://mycluster/ # The location of the HTML files, and access control information DocumentRoot /var/www <Directory /var/www> Options -Indexes Order allow,deny Allow from all </Directory> </VirtualHost>
ProxyPass / balancer://mycluster stickysession=JSESSIONID
Configuration file for the ISAPI Connector Extension uri definition extension_uri=/jboss/isapi_redirect.dll Full path to the log file for the ISAPI Connector log_file=c:\connectors\isapi_redirect.log Log level (debug, info, warn, error or trace) log_level=info Full path to the workers.properties file worker_file=c:\connectors\workers.properties Full path to the uriworkermap.properties file worker_mount_file=c:\connectors\uriworkermap.properties #Full path to the rewrite.properties file rewrite_rule_file=c:\connectors\rewrite.properties
images and css files for path /status are provided by worker01 /status=worker01 /images/*=worker01 /css/*=worker01 Path /web-console is provided by worker02 IIS (customized) error page is used for http errors with number greater or equal to 400 css files are provided by worker01 /web-console/*=worker02;use_server_errors=400 /web-console/css/*=worker01 Example of exclusion from mapping, logo.gif won't be displayed !/web-console/images/logo.gif=* Requests to /app-01 or /app-01/something will be routed to worker01 /app-01|/*=worker01 Requests to /app-02 or /app-02/something will be routed to worker02 /app-02|/*=worker02
An entry that lists all the workers defined worker.list=worker01, worker02 Entries that define the host and port associated with these workers First JBoss EAP server definition, port 8009 is standard port for AJP in EAP worker.worker01.host=127.0.0.1 worker.worker01.port=8009 worker.worker01.type=ajp13 Second JBoss EAP server definition worker.worker02.host=127.0.0.100 worker.worker02.port=8009 worker.worker02.type=ajp13
#Simple example Images are accessible under abc path /app-01/abc/=/app-01/images/
C:\> net stop was /Y C:\> net start w3svc
Configuration file for the ISAPI Connector Extension uri definition extension_uri=/jboss/isapi_redirect.dll Full path to the log file for the ISAPI Connector log_file=c:\connectors\isapi_redirect.log Log level (debug, info, warn, error or trace) log_level=info Full path to the workers.properties file worker_file=c:\connectors\workers.properties Full path to the uriworkermap.properties file worker_mount_file=c:\connectors\uriworkermap.properties #OPTIONAL: Full path to the rewrite.properties file rewrite_rule_file=c:\connectors\rewrite.properties
images, css files, path /status and /web-console will be provided by nodes defined in the load-balancer called "router" /css/*=router /images/*=router /status=router /web-console|/*=router Example of exclusion from mapping, logo.gif won't be displayed !/web-console/images/logo.gif=* Requests to /app-01 and /app-02 will be routed to nodes defined in the load-balancer called "router" /app-01|/*=router /app-02|/*=router mapping for management console, nodes in cluster can be enabled or disabled here /jkmanager|/*=status
The advanced router LB worker worker.list=router,status First EAP server definition, port 8009 is standard port for AJP in EAP # lbfactor defines how much the worker will be used. The higher the number, the more requests are served lbfactor is useful when one machine is more powerful ping_mode=A - all possible probes will be used to determine that connections are still working worker.worker01.port=8009 worker.worker01.host=127.0.0.1 worker.worker01.type=ajp13 worker.worker01.ping_mode=A worker.worker01.socket_timeout=10 worker.worker01.lbfactor=3 Second EAP server definition worker.worker02.port=8009 worker.worker02.host=127.0.0.100 worker.worker02.type=ajp13 worker.worker02.ping_mode=A worker.worker02.socket_timeout=10 worker.worker02.lbfactor=1 Define the LB worker worker.router.type=lb worker.router.balance_workers=worker01,worker02 Define the status worker for jkmanager worker.status.type=status
#Simple example Images are accessible under abc path /app-01/abc/=/app-01/images/ Restart the IIS server. Restart your IIS server by using the net stop and net start commands. C:\> net stop was /Y C:\> net start w3svc
<!-- ============== Built In Servlet Mappings =============== --> <!-- The servlet mappings for the built in servlets defined above. --> <!-- The mapping for the default servlet --> <!--servlet-mapping> <servlet-name>default</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping--> <!-- The mapping for the invoker servlet --> <!--servlet-mapping> <servlet-name>invoker</servlet-name> <url-pattern>/servlet/*</url-pattern> </servlet-mapping--> <!-- The mapping for the Jakarta Server Pages servlet --> <!--servlet-mapping> <servlet-name>jsp</servlet-name> <url-pattern>*.jsp</url-pattern> </servlet-mapping-->
Init fn="load-modules" funcs="jk_init,jk_service" shlib="/lib/nsapi_redirector.so" shlib_flags="(global|now)" Init fn="jk_init" worker_file=" IPLANET_CONFIG /connectors/workers.properties" log_level="info" log_file=" IPLANET_CONFIG /connectors/nsapi.log" shm_file=" IPLANET_CONFIG /connectors/tmp/jk_shm"
<Object name="default"> [...] NameTrans fn="assign-name" from="/status" name="jknsapi" NameTrans fn="assign-name" from="/images(|/*)" name="jknsapi" NameTrans fn="assign-name" from="/css(|/*)" name="jknsapi" NameTrans fn="assign-name" from="/nc(|/*)" name="jknsapi" NameTrans fn="assign-name" from="/jmx-console(|/*)" name="jknsapi" </Object>
<Object name="jknsapi"> ObjectType fn=force-type type=text/plain Service fn="jk_service" worker="worker01" path="/status" Service fn="jk_service" worker="worker02" path="/nc(/*)" Service fn="jk_service" worker="worker01" </Object>
An entry that lists all the workers defined worker.list=worker01, worker02 Entries that define the host and port associated with these workers worker.worker01.host=127.0.0.1 worker.worker01.port=8009 worker.worker01.type=ajp13 worker.worker02.host=127.0.0.100 worker.worker02.port=8009 worker.worker02.type=ajp13
IPLANET_CONFIG /../bin/stopserv IPLANET_CONFIG /../bin/startserv
<Object name="default"> [...] NameTrans fn="assign-name" from="/status" name="jknsapi" NameTrans fn="assign-name" from="/images(|/*)" name="jknsapi" NameTrans fn="assign-name" from="/css(|/*)" name="jknsapi" NameTrans fn="assign-name" from="/nc(|/*)" name="jknsapi" NameTrans fn="assign-name" from="/jmx-console(|/*)" name="jknsapi" NameTrans fn="assign-name" from="/jkmanager/*" name="jknsapi" </Object>
<Object name="jknsapi"> ObjectType fn=force-type type=text/plain Service fn="jk_service" worker="status" path="/jkmanager(/*)" Service fn="jk_service" worker="router" </Object>
The advanced router LB worker A list of each worker worker.list=router,status First JBoss EAP server (worker node) definition. Port 8009 is the standard port for AJP # worker.worker01.port=8009 worker.worker01.host=127.0.0.1 worker.worker01.type=ajp13 worker.worker01.ping_mode=A worker.worker01.socket_timeout=10 worker.worker01.lbfactor=3 Second JBoss EAP server worker.worker02.port=8009 worker.worker02.host=127.0.0.100 worker.worker02.type=ajp13 worker.worker02.ping_mode=A worker.worker02.socket_timeout=10 worker.worker02.lbfactor=1 Define the load-balancer called "router" worker.router.type=lb worker.router.balance_workers=worker01,worker02 Define the status worker worker.status.type=status
IPLANET_CONFIG /../bin/stopserv IPLANET_CONFIG /../bin/startserv
-Dorg.wildfly.openssl.path= PATH_TO_OPENSSL_LIBS
module add --name=com.mysql --resources= /path/to /mysql-connector-java-8.0.12.jar --export-dependencies=javaee.api,sun.jdk,ibm.jdk,javax.api,javax.transaction.api
module add --module-root-dir= /path/to /my-external-modules/ --name=com.mysql --resources= /path/to /mysql-connector-java-8.0.12.jar --dependencies=javaee.api,sun.jdk,ibm.jdk,javax.api,javax.transaction.api
module add --name=com.mysql --slot=8.0 --resources= /path/to /mysql-connector-java-8.0.12.jar --dependencies=javaee.api,sun.jdk,ibm.jdk,javax.api,javax.transaction.api
/subsystem=undertow/servlet-container=default/setting=crawler-session-management:add /subsystem=undertow/servlet-container=default/setting=crawler-session-management:read-resource
/subsystem=undertow/servlet-container=default/setting=jsp:read-resource
/subsystem=undertow/servlet-container=default/setting=persistent-sessions:add /subsystem=undertow/servlet-container=default/setting=persistent-sessions:read-resource
/subsystem=undertow/servlet-container=default/setting=session-cookie:add /subsystem=undertow/servlet-container=default/setting=session-cookie:read-resource
/subsystem=undertow/servlet-container=default/setting=websockets:read-resource
/subsystem=undertow/server=default-server/host=default-host/setting=access-log:add /subsystem=undertow/server=default-server/host=default-host/setting=access-log:read-resource
/subsystem=undertow/server=default-server/http-listener=default:write-attribute(name=record-request-start-time,value=true)
/subsystem=undertow/server=default-server/host=default-host/setting=single-sign-on:add /subsystem=undertow/server=default-server/host=default-host/setting=single-sign-on:read-resource
<module xmlns="urn:jboss:module:1.8" name="com.sun.jsf-impl: IMPL_NAME - VERSION "> <properties> <property name="jboss.api" value="private"/> </properties> <dependencies> <module name="javax.faces.api: IMPL_NAME - VERSION "/> <module name="javaee.api"/> <module name="javax.servlet.jstl.api"/> <module name="org.apache.xerces" services="import"/> <module name="org.apache.xalan" services="import"/> <module name="org.jboss.weld.core"/> <module name="org.jboss.weld.spi"/> <module name="javax.xml.rpc.api"/> <module name="javax.rmi.api"/> <module name="org.omg.api"/> </dependencies> <resources> <resource-root path="impl- VERSION .jar"/> </resources> </module>
<module xmlns="urn:jboss:module:1.8" name="com.sun.jsf-impl: IMPL_NAME - VERSION "> <properties> <property name="jboss.api" value="private"/> </properties> <dependencies> <module name="javax.faces.api: IMPL_NAME - VERSION "> <imports> <include path="META-INF/**"/> </imports> </module> <module name="javaee.api"/> <module name="javax.servlet.jstl.api"/> <module name="org.apache.xerces" services="import"/> <module name="org.apache.xalan" services="import"/> <!-- extra dependencies for MyFaces --> <module name="org.apache.commons.collections"/> <module name="org.apache.commons.codec"/> <module name="org.apache.commons.beanutils"/> <module name="org.apache.commons.digester"/> <!-- extra dependencies for MyFaces 1.1 <module name="org.apache.commons.logging"/> <module name="org.apache.commons.el"/> <module name="org.apache.commons.lang"/> --> <module name="javax.xml.rpc.api"/> <module name="javax.rmi.api"/> <module name="org.omg.api"/> </dependencies> <resources> <resource-root path=" IMPL_NAME -impl- VERSION .jar"/> </resources> </module>
<module xmlns="urn:jboss:module:1.8" name="javax.faces.api: IMPL_NAME - VERSION "> <dependencies> <module name="com.sun.jsf-impl: IMPL_NAME - VERSION "/> <module name="javax.enterprise.api" export="true"/> <module name="javax.servlet.api" export="true"/> <module name="javax.servlet.jsp.api" export="true"/> <module name="javax.servlet.jstl.api" export="true"/> <module name="javax.validation.api" export="true"/> <module name="org.glassfish.javax.el" export="true"/> <module name="javax.api"/> <module name="javax.websocket.api"/> </dependencies> <resources> <resource-root path="jsf-api- VERSION .jar"/> </resources> </module>
<module xmlns="urn:jboss:module:1.8" name="javax.faces.api: IMPL_NAME - VERSION "> <dependencies> <module name="javax.enterprise.api" export="true"/> <module name="javax.servlet.api" export="true"/> <module name="javax.servlet.jsp.api" export="true"/> <module name="javax.servlet.jstl.api" export="true"/> <module name="javax.validation.api" export="true"/> <module name="org.glassfish.javax.el" export="true"/> <module name="javax.api"/> <!-- extra dependencies for MyFaces 1.1 <module name="org.apache.commons.logging"/> <module name="org.apache.commons.el"/> <module name="org.apache.commons.lang"/> --> </dependencies> <resources> <resource-root path="myfaces-api- VERSION .jar"/> </resources> </module>
<module xmlns="urn:jboss:module:1.8" name="org.jboss.as.jsf-injection: IMPL_NAME - VERSION "> <properties> <property name="jboss.api" value="private"/> </properties> <resources> <resource-root path="wildfly-jsf-injection- INJECTION_VERSION .jar"/> <resource-root path="weld-core-jsf- WELD_VERSION .jar"/> </resources> <dependencies> <module name="com.sun.jsf-impl: IMPL_NAME - VERSION "/> <module name="java.naming"/> <module name="java.desktop"/> <module name="org.jboss.as.jsf"/> <module name="org.jboss.as.web-common"/> <module name="javax.servlet.api"/> <module name="org.jboss.as.ee"/> <module name="org.jboss.as.jsf"/> <module name="javax.enterprise.api"/> <module name="org.jboss.logging"/> <module name="org.jboss.weld.core"/> <module name="org.jboss.weld.api"/> <module name="javax.faces.api: IMPL_NAME - VERSION "/> </dependencies> </module>
<module xmlns="urn:jboss:module:1.8" name="org.jboss.as.jsf-injection: IMPL_NAME - VERSION "> <properties> <property name="jboss.api" value="private"/> </properties> <resources> <resource-root path="wildfly-jsf-injection- INJECTION_VERSION .jar"/> <resource-root path="weld-jsf- WELD_VERSION .jar"/> </resources> <dependencies> <module name="com.sun.jsf-impl: IMPL_NAME - VERSION "/> <module name="javax.api"/> <module name="org.jboss.as.web-common"/> <module name="javax.servlet.api"/> <module name="org.jboss.as.jsf"/> <module name="org.jboss.as.ee"/> <module name="org.jboss.as.jsf"/> <module name="javax.enterprise.api"/> <module name="org.jboss.logging"/> <module name="org.jboss.weld.core"/> <module name="org.jboss.weld.api"/> <module name="org.wildfly.security.elytron"/> <module name="javax.faces.api: IMPL_NAME - VERSION "/> </dependencies> </module>
<module xmlns="urn:jboss:module:1.5" name="org.apache.commons.digester"> <properties> <property name="jboss.api" value="private"/> </properties> <resources> <resource-root path="commons-digester- VERSION .jar"/> </resources> <dependencies> <module name="javax.api"/> <module name="org.apache.commons.collections"/> <module name="org.apache.commons.logging"/> <module name="org.apache.commons.beanutils"/> </dependencies> </module>
<Location /mod_cluster-manager> SetHandler mod_cluster-manager Require ip 127.0.0.1 </Location>
Define list of workers that will be used for mapping requests worker.list=loadbalancer,status Define Node1 modify the host as your host IP or DNS name. worker.node1.port=8009 worker.node1.host=node1.mydomain.com worker.node1.type=ajp13 worker.node1.ping_mode=A worker.node1.lbfactor=1 Define Node2 modify the host as your host IP or DNS name. worker.node2.port=8009 worker.node2.host= node2.mydomain.com worker.node2.type=ajp13 worker.node2.ping_mode=A worker.node2.lbfactor=1 Load-balancing behavior worker.loadbalancer.type=lb worker.loadbalancer.balance_workers=node1,node2 worker.loadbalancer.sticky_session=1 Status worker for managing load balancer worker.status.type=status
JAVA_OPTS="USDJAVA_OPTS -Dorg.wildfly.openssl.path= JBCS_OPENSSL_PATH
/system-property=org.wildfly.openssl.path:add(value= JBCS_OPENSSL_PATH )
subscription-manager repos --enable REPO_NAME
Repository REPO_NAME is enabled for this system.
yum install jbcs-httpd24-openssl
WILDFLY_OPTS="USDWILDFLY_OPTS -Dorg.wildfly.openssl.path= JBCS_OPENSSL_PATH "
/system-property=org.wildfly.openssl.path:add(value= JBCS_OPENSSL_PATH )
/subsystem=elytron:write-attribute(name=initial-providers, value=combined-providers) /subsystem=elytron:undefine-attribute(name=final-providers) reload
/subsystem=elytron/server-ssl-context=httpsSSC:add(key-manager=localhost-manager, trust-manager=ca-manager, provider-name=openssl) reload
/core-service=management/security-realm=ApplicationRealm/server-identity=ssl:write-attribute(name=protocol,value=openssl.TLSv1.2) reload
15:37:59,814 INFO [org.wildfly.openssl.SSL] (MSC service thread 1-7) WFOPENSSL0002 OpenSSL Version OpenSSL 1.0.2k-fips 23 Mar 2017