Sei sulla pagina 1di 508
Red Hat JBoss Enterprise Application Platform 7.2 Configuration Guide For Use with Red Hat JBoss
Red Hat JBoss Enterprise Application Platform 7.2 Configuration Guide For Use with Red Hat JBoss

Red Hat JBoss Enterprise Application Platform 7.2

Configuration Guide

For Use with Red Hat JBoss Enterprise Application Platform 7.2

Last Updated: 2019-05-02

Red Hat JBoss Enterprise Application Platform 7.2 Configuration Guide

For Use with Red Hat JBoss Enterprise Application Platform 7.2

Legal Notice

Copyright © 2019 Red Hat, Inc.

The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at

http://creativecommons.org/licenses/by-sa/3.0/

. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.

Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.

Red Hat, Red Hat Enterprise Linux, the Shadowman logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.

Linux ® is the registered trademark of Linus Torvalds in the United States and other countries.

Java ® is a registered trademark of Oracle and/or its affiliates.

XFS ® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.

MySQL ® is a registered trademark of MySQL AB in the United States, the European Union and other countries.

Node.js ® is an official trademark of Joyent. Red Hat Software Collections is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.

The OpenStack ® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.

All other trademarks are the property of their respective owners.

Abstract

The purpose of this guide is to cover many of the configuration tasks needed for setting up and maintaining JBoss EAP as well as running applications and other services on it.

Table of Contents

Table of Contents

CHAPTER 1. INTRODUCTION . . . . . . . . . . . .
CHAPTER 1. INTRODUCTION
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
21
.
.
CHAPTER 2. STARTING AND STOPPING JBOSS EAP
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
22
.
.
2.1.
STARTING JBOSS EAP
22
Start JBoss EAP as a Standalone Server
22
Start JBoss EAP in a Managed Domain
22
2.2.
STOPPING JBOSS EAP
23
Stop an Interactive Instance of JBoss EAP
23
Stop a Background Instance of JBoss EAP
23
2.3.
RUNNING JBOSS EAP IN ADMIN-ONLY MODE
23
Running a Standalone Server in Admin-only Mode
23
Start the Server in Admin-only Mode
23
Check If the Server is Running in Admin-only Mode
23
Reload in a Different Mode from the Management CLI
24
Running a Managed Domain in Admin-only Mode
24
Start a Host Controller in Admin-only Mode
24
Check If a Host Controller is Running in Admin-only Mode
24
Reload in a Different Mode from the Management CLI
24
2.4.
SUSPEND AND SHUT DOWN JBOSS EAP GRACEFULLY
24
2.4.1.
Suspend Servers
26
Check the Server Suspend State
26
Suspend
26
Resume
26
Start a Server in a Suspended State
27
2.4.2. Shut Down Servers Gracefully Using the Management CLI
27
2.4.3. Shut Down Servers Gracefully Using an OS Signal
28
2.5.
STARTING AND STOPPING JBOSS EAP (RPM INSTALLATION)
28
2.5.1.
Starting JBoss EAP (RPM Installation)
28
Start JBoss EAP as a Standalone Server (RPM Installation)
28
Start JBoss EAP in a Managed Domain (RPM Installation)
28
Configure RPM Service Properties
29
2.5.2.
Stopping JBoss EAP (RPM Installation)
30
Stop JBoss EAP as a Standalone Server (RPM Installation)
30
Stop JBoss EAP in a Managed Domain (RPM Installation)
30
2.6.
POWERSHELL SCRIPTS (WINDOWS SERVER)
30
CHAPTER 3. JBOSS EAP MANAGEMENT
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
32
.
.

3.1.

ABOUT SUBSYSTEMS, EXTENSIONS, AND PROFILES

32

Using the Management Console or the Management CLI

32

3.2.

MANAGEMENT USERS

32

3.2.1. Adding a Management User

33

3.2.2. Running the Add-User Utility Non-Interactively

33

 

Create a User Belonging to Multiple Groups

34

Specify an Alternative Properties File

34

3.2.3. Setting Add-User Utility Password Restrictions

34

3.2.4. Updating a Management User

35

3.3. OPTIMIZING THE JBOSS EAP SERVER CONFIGURATION

35

3.4. MANAGEMENT INTERFACES

36

 

3.4.1.

Management CLI

36

Launch the Management CLI

36

Connect to a Running Server

36

Red Hat JBoss Enterprise Application Platform 7.2 Configuration Guide

 

Display Help

36

Quit the Management CLI

37

View System Settings

37

Update System Settings

37

Start Servers

37

3.4.2.

Management Console

37

3.4.2.1. Updating Attributes in the Management Console

38

3.4.2.2. Enable/Disable Management Console

38

3.4.2.3. Change the Language of the Management Console

39

To Change the Language of the Management Console

39

3.5.

MANAGEMENT APIS

39

3.5.1.

HTTP API

39

Read Resources

39

Update Resources

40

3.5.2.

Native API

41

3.6.

CONFIGURATION DATA

41

3.6.1. Standalone Server Configuration Files

41

3.6.2. Managed Domain Configuration Files

42

3.6.3. Backing Up Configuration Data

43

3.6.4. Configuration File Snapshots

43

Take a Snapshot

43

List Snapshots

44

Delete a Snapshot

44

Start the Server with a Snapshot

44

3.6.5.

View Configuration Changes

44

Track and View Configuration Changes from the Management CLI

45

Track and View Configuration Changes from the Management Console

46

3.6.6.

Property Replacement

47

Nested Expressions

47

Descriptor-Based Property Replacement

48

3.6.7.

Using Git to Manage Configuration Data

48

Using a Local Git Repository

49

Using a Remote Git Repository

49

Publishing Remote Configuration Data When Using Git

51

Using Snapshots with Git

51

Taking Snapshots When Using Git

51

Listing Snapshots When Using Git

51

Deleting Snapshots When Using Git

52

3.7.

FILE SYSTEM PATHS

52

3.7.1. View File System Paths

53

3.7.2. Override a Standard Path

54

Overriding a Managed Domain’s Standard Paths

54

3.7.3.

Add a Custom Path

55

3.8.

DIRECTORY GROUPING

55

Directory Grouping by Server

55

Directory Grouping by Type

56

3.9.

SYSTEM PROPERTIES

56

Passing a System Property to the Startup Script

57

Setting a System Property Using the Management CLI

57

Setting a System Property Using the Management Console

57

Setting a System Property Using JAVA_OPTS

58

3.10. MANAGEMENT AUDIT LOGGING

58

Standalone Server Audit Logging

59

Table of Contents

Managed Domain Audit Logging

59

3.10.1.

Enable Management Audit Logging

60

Enable Standalone Server Audit Logging

60

Enable Managed Domain Audit Logging

60

3.10.2.

Enable JMX Management Audit Logging

60

Enable Standalone Server JMX Audit Logging

60

Enable Managed Domain JMX Audit Logging

61

3.10.3. Send Management Audit Logging to a Syslog Server

61

3.10.4. Read Audit Log Entries

62

3.11.

SERVER LIFECYCLE EVENT NOTIFICATIONS

63

3.11.1. Monitor Server Lifecycle Events Using the Core Management Subsystem

63

3.11.2. Monitor Server Lifecycle Events Using JMX Notifications

66

CHAPTER 4. NETWORK AND PORT CONFIGURATION . . . . . . . . .
CHAPTER 4. NETWORK AND PORT CONFIGURATION
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
69
.
.
4.1.
INTERFACES
69
4.1.1. Default Interface Configurations
69
4.1.2.
Configuring Interfaces
69
Add an Interface with a NIC Value
70
Add an Interface with Several Conditional Values
70
Update an Interface Attribute
70
Add an Interface to a Server in a Managed Domain
70
4.2.
SOCKET BINDINGS
71
4.2.1. Management Ports
71
4.2.2. Default Socket Bindings
72
Standalone Server
72
Managed Domain
72
4.2.3. Configuring Socket Bindings
74
4.2.4. Port Offsets
74
4.3.
IPV6 ADDRESSES
75
Configure the JVM Stack for IPv6 Addresses
75
Update Interface Declarations for IPv6 Addresses
75
CHAPTER 5. JBOSS EAP SECURITY
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
77
.
.
CHAPTER 6. JBOSS EAP CLASS LOADING
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
78
.
.

6.1.

MODULES

78

Static Modules

78

Dynamic Modules

79

Predefined Modules

79

6.2.

MODULE DEPENDENCIES

79

Optional Dependencies

80

Export a Dependency

80

Global Modules

80

6.3.

CREATE A CUSTOM MODULE

80

Create a Custom Module Manually

80

Create a Custom Module Using the Management CLI

81

Add the Module as a Dependency

82

6.4.

REMOVE A CUSTOM MODULE

82

Remove a Custom Module Manually

82

Remove a Custom Module Using the Management CLI

83

6.5. DEFINE GLOBAL MODULES

83

6.6. CONFIGURE SUBDEPLOYMENT ISOLATION

84

Enable Subdeployment Module Isolation for All Deployments

84

6.7.

DEFINE AN EXTERNAL JBOSS EAP MODULE DIRECTORY

84

Red Hat JBoss Enterprise Application Platform 7.2 Configuration Guide

6.8. DYNAMIC MODULE NAMING CONVENTIONS

85

CHAPTER 7. DEPLOYING APPLICATIONS . . . . . . . . . . .
CHAPTER 7. DEPLOYING APPLICATIONS
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
86 .
.
7.1. DEPLOYING APPLICATIONS USING THE MANAGEMENT CLI
86
7.1.1. Deploy an Application to a Standalone Server Using the Management CLI
86
Deploy an Application
86
Undeploy an Application
87
Disable an Application
87
Enable an Application
87
List Deployments
87
7.1.2.
Deploy an Application in a Managed Domain Using the Management CLI
88
Deploy an Application
88
Undeploy an Application
88
Disable an Application
89
Enable an Application
89
List Deployments
89
7.2.
DEPLOYING APPLICATIONS USING THE MANAGEMENT CONSOLE
90
7.2.1.
Deploy an Application to a Standalone Server Using the Management Console
90
Deploy an Application
90
Undeploy an Application
90
Disable an Application
90
Replace an Application
90
7.2.2.
Deploy an Application in a Managed Domain Using the Management Console
90
Add an Application
91
Deploy an Application to a Server Group
91
Undeploy an Application from a Server Group
91
Remove an Application
91
Disable an Application
91
Replace an Application
91
7.3.
DEPLOYING APPLICATIONS USING THE DEPLOYMENT SCANNER
92
7.3.1.
Deploy an Application to a Standalone Server Using the Deployment Scanner
92
Deploy an Application
92
Undeploy an Application
92
Redeploy an Application
93
7.3.2.
Configure the Deployment Scanner
93
Disable the Deployment Scanner
93
Change the Scan Interval
93
Change the Deployment Folder
93
Enable the Automatic Deployment of Exploded Content
93
Disable the Automatic Deployment of Zipped Content
93
Disable the Automatic Deployment of XML Content
94
7.3.3.
Define a Custom Deployment Scanner
94
7.4.
DEPLOYING APPLICATIONS USING MAVEN
94
7.4.1.
Deploy an Application to a Standalone Server Using Maven
94
Deploy an Application
94
Undeploy an Application
95
7.4.2.
Deploy an Application in a Managed Domain Using Maven
95
Deploy an Application
95
Undeploy an Application
96
7.5.
DEPLOYING APPLICATIONS USING THE HTTP API
97
7.5.1.
Deploy an Application to a Standalone Server Using the HTTP API
97
Deploy an Application
97
Undeploy an Application
97

Table of Contents

 

7.5.2.

Deploy an Application in a Managed Domain Using the HTTP API

97

Deploy an Application

97

Undeploy an Application

98

7.6.

CUSTOMIZING DEPLOYMENT BEHAVIOR

98

7.6.1.

Define a Custom Directory for Deployment Content

98

Define a Custom Directory for a Standalone Server

98

Define a Custom Directory for a Managed Domain

98

7.6.2. Control the Order of Deployments

99

7.6.3. Override Deployment Content

99

7.6.4. Using Rollout Plans

100

 

About Rollout Plans

100

Rollout Plan Syntax

101

Deploy Using a Rollout Plan

102

Deploy Using a Stored Rollout Plan

102

Remove a Stored Rollout Plan

103

Default Rollout Plan

103

7.7.

MANAGING EXPLODED DEPLOYMENTS

103

Create an Empty Exploded Deployment

103

Explode an Existing Archive Deployment

104

Add Content to an Exploded Deployment

104

Remove Content from an Exploded Deployment

104

7.8.

VIEWING DEPLOYMENT CONTENT

104

7.8.1. Browse Files in a Deployment

104

7.8.2. Read Deployment Content

106

 

7.8.2.1. Display the Contents of a File

106

7.8.2.2. Save the Contents of a File

106

CHAPTER 8. DOMAIN MANAGEMENT . . . . . . . . . . .
CHAPTER 8. DOMAIN MANAGEMENT
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
107 .
.
.
8.1. ABOUT MANAGED DOMAINS
107
8.1.1. About the Domain Controller
108
8.1.2. About Host Controllers
108
8.1.3. About Process Controllers
109
8.1.4. About Server Groups
109
8.1.5. About Servers
109
8.2.
NAVIGATING DOMAIN CONFIGURATIONS
109
Management Console
109
Management CLI
110
8.3.
LAUNCHING A MANAGED DOMAIN
111
8.3.1.
Start a Managed Domain
111
Start the Domain Controller
111
Start a Host Controller
112
8.3.2.
Configure the Domain Controller
112
Configure a Host to Act as the Domain Controller
112
8.3.3.
Configure Host Controllers
112
Connect to the Domain Controller
113
8.3.3.1.
Configure the Name of a Host
113
8.4.
MANAGING SERVERS
114
8.4.1.
Configure Server Groups
114
Add a Server Group
114
Update a Server Group
115
Remove a Server Group
115
Server Group Attributes
115
8.4.2.
Configure Servers
115

Red Hat JBoss Enterprise Application Platform 7.2 Configuration Guide

 

Add a Server

116

Update a Server

116

Remove a Server

116

Server Attributes

116

8.4.3.

Start and Stop Servers

117

Start Servers

117

Stop Servers

117

Reload Servers

117

Kill Servers

117

8.5.

DOMAIN CONTROLLER DISCOVERY AND FAILOVER

117

8.5.1. Configure Domain Discovery Options

118

8.5.2. Start a Host Controller with a Cached Domain Configuration

118

8.5.3. Promote a Host Controller to Act as Domain Controller

119

 

Cache the Domain Configuration

119

Promote a Host Controller to Be the Domain Controller

119

8.6.

MANAGED DOMAIN SETUPS

120

8.6.1. Set Up a Managed Domain on a Single Machine

120

8.6.2. Set Up a Managed Domain on Two Machines

121

 

Create a Managed Domain on Two Machines

121

8.7.

MANAGING MULTIPLE JBOSS EAP VERSIONS

122

8.7.1.

Configure a JBoss EAP 7.x Domain Controller to Administer JBoss EAP 6 Instances

122

8.7.1.1. Add the JBoss EAP 6 Configuration to the JBoss EAP 7 Domain Controller

123

8.7.1.2. Update the Behavior for the JBoss EAP 6 Profiles

124

8.7.1.3. Set the Server Group for the JBoss EAP 6 Servers

125

8.7.1.4. Prevent the JBoss EAP 6 Instances from Receiving JBoss EAP 7 Updates

125

8.7.2.

Configure a JBoss EAP 7.1 Domain Controller to Administer JBoss EAP 7.0 Instances

126

8.7.2.1. Add the JBoss EAP 7.0 Configuration to the JBoss EAP 7.1 Domain Controller

126

8.7.2.2. Set the Server Group for the JBoss EAP 7.0 Servers

128

8.7.2.3. Prevent the JBoss EAP 7.0 Instances from Receiving JBoss EAP 7.1 Updates

128

8.8.

MANAGING JBOSS EAP PROFILES

129

8.8.1. About Profiles

129

8.8.2. Cloning a Profile

129

8.8.3. Creating Hierarchical Profiles

130

.

CHAPTER 9. CONFIGURING JVM SETTINGS

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

9.1. CONFIGURING JVM SETTINGS FOR A STANDALONE SERVER

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

131

131

.

.

9.2.

CONFIGURING JVM SETTINGS FOR A MANAGED DOMAIN

 

131

9.2.1. Defining JVM Settings on a Host Controller

 

132

9.2.2. Applying JVM Settings to a Server Group

 

132

9.2.3. Applying JVM Settings to an Individual Server

 

132

9.3. DISPLAYING THE JVM STATUS

133

9.4. TUNING THE JVM

.

CHAPTER 10. MAIL SUBSYSTEM

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

133

.

.

134

.

.

10.1.

CONFIGURING THE MAIL SUBSYSTEM

 

134

Configuring SMTP server for use in an application

 

134

10.2. CONFIGURING CUSTOM TRANSPORTS

 

134

10.3. USE A CREDENTIAL STORE FOR PASSWORDS

.

CHAPTER 11. LOGGING WITH JBOSS EAP

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

136

.

.

137

.

.

11.1. ABOUT SERVER LOGGING

137

11.1.1. Server Logging

137

11.1.2.

Bootup Logging

137

11.1.2.1. View Bootup Errors

137

Table of Contents

Examine the Server Log File

138

Read the Boot Errors from the Management CLI

138

11.1.3. Garbage Collection Logging

139

11.1.4. Default Log File Locations

139

11.1.5. Set the Default Locale of the Server

140

Set the Language

140

Set the Language and Country

140

Set the Server Locale Using the org.jboss.logging.locale Property

140

11.2.

VIEWING LOG FILES

141

View Logs from the Management Console

141

View Logs from the Management CLI

141

11.3.

ABOUT THE LOGGING SUBSYSTEM

142

11.3.1. Root Logger

142

11.3.2. Log Categories

143

11.3.3. Log Handlers

143

Log Handler Types

143

11.3.4.

Log Levels

144

Supported Log Levels

144

11.3.5.

Log Formatters

145

Pattern Formatter

146

JSON Formatter

146

XML Formatter

146

Custom Formatter

146

11.3.6. Filter Expressions

146

11.3.7. Implicit Logging Dependencies

148

11.4.

CONFIGURING LOG CATEGORIES

148

Add a Log Category

148

Configure Log Category Settings

149

Assign a Handler

149

Remove a Log Category

149

11.5.

CONFIGURING LOG HANDLERS

149

11.5.1.

Configure a Console Log Handler

150

Add a Console Log Handler

150

Configure Console Log Handler Settings

150

Assign the Console Log Handler to a Logger

151

Remove a Console Log Handler

151

11.5.2.

Configure a File Log Handler

152

Add a File Log Handler

152

Configure File Log Handler Settings

152

Assign the File Log Handler to a Logger

153

Remove a File Log Handler

153

11.5.3.

Configure a Periodic Rotating Log Handler

153

Add a Periodic Log Handler

154

Configure Periodic Log Handler Settings

154

Assign the Periodic Log Handler to a Logger

155

Remove a Periodic Log Handler

155

11.5.4.

Configure a Size Rotating Log Handler

156

Add a Size Log Handler

156

Configure Size Log Handler Settings

156

Assign the Size Log Handler to a Logger

158

Remove a Size Log Handler

158

11.5.5.

Configure a Periodic Size Rotating Log Handler

158

Add a Periodic Size Log Handler

158

Red Hat JBoss Enterprise Application Platform 7.2 Configuration Guide

Configure Periodic Size Log Handler Settings 159 Assign the Periodic Size Log Handler to a
Configure Periodic Size Log Handler Settings
159
Assign the Periodic Size Log Handler to a Logger
160
Remove a Periodic Size Log Handler
160
11.5.6.
Configure a Syslog Handler
161
Add a Syslog Handler
161
Configure Syslog Handler Settings
161
Assign the Syslog Handler to a Logger
162
Remove a Syslog Handler
162
11.5.7.
Configure a Socket Log Handler
162
Add the Socket Binding
163
Add the Log Formatter
163
Add the Socket Log Handler
163
Configure Socket Log Handler Settings
163
Assign the Socket Log Handler to a Logger
164
Remove a Socket Log Handler
164
Send Log Messages Over a Socket Using SSL/TLS
164
11.5.8.
Configure a Custom Log Handler
165
Add a Custom Log Handler
166
Configure Custom Log Handler Settings
166
Assign the Custom Log Handler to a Logger
167
Remove a Custom Log Handler
167
11.5.9.
Configure an Async Log Handler
167
Add an Async Log Handler
167
Add a Sub-handler
168
Configure Async Log Handler Settings
168
Assign the Async Log Handler to a Logger
168
Remove an Async Log Handler
169
11.6.
CONFIGURING THE ROOT LOGGER
169
Configure the Root Logger
169
11.7.
CONFIGURING LOG FORMATTERS
169
11.7.1. Configure a Pattern Formatter
170
Create a Pattern Formatter
170
11.7.2.
Configure a JSON Log Formatter
170
Add a JSON Log Formatter
171
Add a Logstash JSON Log Formatter
171
11.7.3.
Configure an XML Log Formatter
172
Add an XML Log Formatter
172
Add a Key Override XML Log Formatter
172
11.7.4.
Configure a Custom Log Formatter
173
Configure a Custom Log Formatter
173
Example Custom XML Formatter
174
Configure a Custom Log Formatter Using the Management Console
174
11.8.
ABOUT APPLICATION LOGGING
175
11.8.1. Per-deployment Logging
175
11.8.1.1. Disable Per-deployment Logging
175
11.8.2.
Logging Profiles
175
11.8.2.1. Configure a Logging Profile
176
Creating and Configuring a Logging Profile
176
11.8.2.2. Example Logging Profile Configuration
177
11.8.3.
Viewing Deployment Logging Configuration
178
11.9.
TUNING THE LOGGING SUBSYSTEM
179
CHAPTER 12. DATASOURCE MANAGEMENT
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
180 .
.
.

Table of Contents

12.1. ABOUT JBOSS EAP DATASOURCES

180

About JDBC

180

Supported Databases

180

Datasource Types

180

The ExampleDS datasource

180

12.2.

JDBC DRIVERS

180

12.2.1.

Installing a JDBC Driver as a Core Module

180

12.2.1.1. Add the JDBC Driver as a Core Module

181

12.2.1.2. Register the JDBC Driver

181

12.2.2.

Installing a JDBC Driver as a JAR Deployment

182

Update a JDBC Driver JAR to be JDBC 4-Compliant

183

12.2.3. JDBC Driver Download Locations

183

12.2.4. Access Vendor-Specific Classes

184

 

Using the MANIFEST.MF File

184

Using a jboss-deployment-structure.xml File

185

12.3.

CREATING DATASOURCES

185

12.3.1.

Create a Non-XA Datasource

185

Defining a Non-XA Datasource Using the Management Console

185

Defining a Non-XA Datasource Using the Management CLI

186

Datasource Parameters

186

12.3.2.

Create an XA Datasource

187

Defining an XA Datasource Using the Management Console

187

Defining an XA Datasource Using the Management CLI

187

Datasource Parameters

188

12.4.

MODIFYING DATASOURCES

188

12.4.1. Modify a Non-XA Datasource

188

12.4.2. Modify an XA Datasource

189

12.5.

REMOVING DATASOURCES

189

12.5.1. Remove a Non-XA Datasource

189

12.5.2. Remove an XA Datasource

190

12.6.

TESTING DATASOURCE CONNECTIONS

190

Test a Datasource Connection Using the Management CLI

190

Test a Datasource Connection Using the Management Console

190

12.7. FLUSHING DATASOURCE CONNECTIONS

190

12.8. XA DATASOURCE RECOVERY

191

12.8.1. Configuring XA Recovery

191

12.8.2. Vendor-Specific XA Recovery

192

 

Vendor-Specific Configuration

192

Known Issues

193

12.9. DATABASE CONNECTION VALIDATION

195

12.10. DATASOURCE SECURITY

197

Secure a Datasource Using a Security Domain

197

Secure a Datasource Using a Password Vault

198

Secure a Datasource Using a Credential Store

198

Secure a Datasource Using an Authentication Context

198

12.11.

DATASOURCE STATISTICS

199

12.11.1.

Enabling Datasource Statistics

199

Enable Datasource Statistics Using the Management CLI

199

Enable Datasource Statistics Using the Management Console

199

12.11.2.

Viewing Datasource Statistics

200

View Datasource Statistics Using the Management CLI

200

View Datasource Statistics Using the Management Console

201

12.12.

DATASOURCE TUNING

201

Red Hat JBoss Enterprise Application Platform 7.2 Configuration Guide

12.13.

CAPACITY POLICIES

201

MaxPoolSize Incrementer Policy

201

Size Incrementer Policy

201

Watermark Incrementer Policy

202

MinPoolSize Decrementer Policy

202

Size Decrementer Policy

202

TimedOut Decrementer Policy

202

TimedOut/FIFO Decrementer Policy

203

Watermark Decrementer Policy

203

12.14. ENLISTMENT TRACING

203

12.15. EXAMPLE DATASOURCE CONFIGURATIONS

204

12.15.1. Example MySQL Datasource

204

Example: MySQL Datasource Configuration

204

Example: MySQL JDBC Driver module.xml File

204

Example Management CLI Commands

204

12.15.2.

Example MySQL XA Datasource

205

Example: MySQL XA Datasource Configuration

205

Example: MySQL JDBC Driver module.xml File

206

Example Management CLI Commands

206

12.15.3.

Example PostgreSQL Datasource

207

Example: PostgreSQL Datasource Configuration

207

Example: PostgreSQL JDBC Driver module.xml File

207

Example Management CLI Commands

208

12.15.4.

Example PostgreSQL XA Datasource

208

Example: PostgreSQL XA Datasource Configuration

208

Example: PostgreSQL JDBC Driver module.xml File

209

Example Management CLI Commands

209

12.15.5.

Example Oracle Datasource

210

Example: Oracle Datasource Configuration

210

Example: Oracle JDBC Driver module.xml File

211

Example Management CLI Commands

211

12.15.6.

Example Oracle XA Datasource

212

Example: Oracle XA Datasource Configuration

212

Example: Oracle JDBC Driver module.xml File

213

Example Management CLI Commands

213

12.15.7.

Example Microsoft SQL Server Datasource

214

Example: Microsoft SQL Server Datasource Configuration

214

Example: Microsoft SQL Server JDBC Driver module.xml File

214

Example Management CLI Commands

214

12.15.8.

Example Microsoft SQL Server XA Datasource

215

Example: Microsoft SQL Server XA Datasource Configuration

215

Example: Microsoft SQL Server JDBC Driver module.xml File

216

Example Management CLI Commands

216

12.15.9.

Example IBM DB2 Datasource

217

Example: IBM DB2 Datasource Configuration

217

Example: IBM DB2 JDBC Driver module.xml File

218

Example Management CLI Commands

218

12.15.10. Example IBM DB2 XA Datasource

219

Example: IBM DB2 XA Datasource Configuration

219

Example: IBM DB2 JDBC Driver module.xml File

220

Example Management CLI Commands

220

12.15.11.

Example Sybase Datasource

221

Example: Sybase Datasource Configuration

221

Table of Contents

Example: Sybase JDBC Driver module.xml File

221

Example Management CLI Commands

222

12.15.12.

Example Sybase XA Datasource

222

Example: Sybase XA Datasource Configuration

222

Example: Sybase JDBC Driver module.xml File

223

Example Management CLI Commands

223

12.15.13.

Example MariaDB Datasource

224

Example: MariaDB Datasource Configuration

224

Example: MariaDB JDBC Driver module.xml File

225

Example Management CLI Commands

225

12.15.14.

Example MariaDB XA Datasource

226

Example: MariaDB XA Datasource Configuration

226

Example: MariaDB JDBC Driver module.xml File

226

Example Management CLI Commands

227

12.15.15.

Example MariaDB Galera Cluster Datasource

227

Example: MariaDB Galera Cluster Datasource Configuration

228

Example: MariaDB JDBC Driver module.xml File

228

Example Management CLI Commands

228

CHAPTER 13. DATASOURCE MANAGEMENT WITH AGROAL . . . . . . . . .
CHAPTER 13. DATASOURCE MANAGEMENT WITH AGROAL
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
230
.
.
.
.
13.1. ABOUT THE AGROAL DATASOURCES SUBSYSTEM
230
13.2. ENABLING THE AGROAL DATASOURCES SUBSYSTEM
230
13.3. INSTALLING A JDBC DRIVER AS A CORE MODULE FOR AGROAL DATASOURCES
231
13.3.1. Add the JDBC Driver as a Core Module
231
13.3.2. Register the JDBC Driver for Agroal Datasources
232
13.4.
CONFIGURING AGROAL NON-XA DATASOURCES
232
13.4.1. Create an Agroal Datasource
232
13.4.2. Remove an Agroal Datasource
232
13.5.
CONFIGURING AGROAL XA DATASOURCES
232
13.5.1. Create an Agroal XA Datasource
233
13.5.2. Remove an Agroal XA Datasource
233
13.6.
EXAMPLE AGROAL DATASOURCE CONFIGURATIONS
233
13.6.1.
Example MySQL Agroal Datasource
233
Example: MySQL Agroal Datasource Configuration
233
Example: MySQL JDBC Driver module.xml File
234
Example Management CLI Commands
234
13.6.2.
Example MySQL Agroal XA Datasource
234
Example: MySQL Agroal XA Datasource Configuration
235
Example: MySQL JDBC Driver module.xml File
235
Example Management CLI Commands
235
CHAPTER 14. CONFIGURING THE TRANSACTIONS SUBSYSTEM
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
237
.
.
.
.
CHAPTER 15. ORB CONFIGURATION
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
238
.
.
.
.
15.1. ABOUT COMMON OBJECT REQUEST BROKER ARCHITECTURE (CORBA)
238
15.2.
CONFIGURING THE ORB FOR JTS TRANSACTIONS
238
Configure the ORB Using the Management CLI
238
Enable the Security Interceptors
238
Enable Transactions in the IIOP Subsystem
238
Enable JTS in the Transactions Subsystem
238
Configure the ORB Using the Management Console
239
15.3.
CONFIGURE IIOP TO USE SSL/TLS WITH THE ELYTRON SUBSYSTEM
239
CHAPTER 16. JAVA CONNECTOR ARCHITECTURE (JCA) MANAGEMENT
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
241
.
.
.

Red Hat JBoss Enterprise Application Platform 7.2 Configuration Guide

16.1. ABOUT THE JAVA CONNECTOR ARCHITECTURE (JCA)

241

16.2. ABOUT RESOURCE ADAPTERS

241

16.3. CONFIGURING THE JCA SUBSYSTEM

241

Archive Validation

242

 

Bean Validation

243

Work Managers

243

Distributed Work Managers

244

Bootstrap Contexts

246

Cached Connection Manager

246

16.4.

CONFIGURING RESOURCE ADAPTERS

246

16.4.1.

Deploy a Resource Adapter

246

Deploy a Resource Adapter using the Management CLI

246

Deploy a Resource Adapter using the Management Console

247

Deploy a Resource Adapter Using the Deployment Scanner

247

16.4.2.

Configure a Resource Adapter

247

Add the Resource Adapter Configuration

247

Configure the Resource Adapter Settings

247

Activate the Resource Adapter

248

16.4.3.

Configure Resource Adapters to Use the Elytron Subsystem

249

Container-managed Sign-On

249

Security Inflow

249

16.4.4. Deploy and Configure the IBM MQ Resource Adapter

252

16.4.5. Deploy and Configure the Generic JMS Resource Adapter

253

16.5. CONFIGURE MANAGED CONNECTION POOLS

253

16.6. VIEW CONNECTION STATISTICS

253

16.7. FLUSHING RESOURCE ADAPTER CONNECTIONS

254

16.8. TUNING THE RESOURCE ADAPTERS SUBSYSTEM

254

CHAPTER 17. CONFIGURING THE WEB SERVER (UNDERTOW) . . . . . . . .
CHAPTER 17. CONFIGURING THE WEB SERVER (UNDERTOW)
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
255 .
.
.
.
17.1. UNDERTOW SUBSYSTEM OVERVIEW
255
Default Undertow Subsystem Configuration
255
Using Elytron with Undertow Subsystem
256
Runtime Information
257
17.2.
CONFIGURING BUFFER CACHES
258
Default Undertow Subsystem Configuration
258
Updating an Existing Buffer Cache
258
Creating a New Buffer Cache
258
Deleting a Buffer Cache
258
17.3.
CONFIGURING BYTE BUFFER POOLS
258
Updating an Existing Byte Buffer Pool
258
Creating an Byte Buffer Pool
259
Deleting a Byte Buffer Pool
259
17.4.
CONFIGURING A SERVER
259
Default Undertow Subsystem Configuration
260
Updating an Existing Server
260
Creating a New Server
260
Deleting a Server
260
17.5.
CONFIGURING A SERVLET CONTAINER
260
Default Undertow Subsystem Configuration
261
Updating an Existing Servlet Container
261
Creating a New Servlet Container
261
Deleting a Servlet Container
261
17.6.
CONFIGURING A SERVLET EXTENSION
262

Table of Contents

17.7.

CONFIGURING HANDLERS

262

Default Undertow Subsystem Configuration

262

Using WebDAV for Static Resources

262

Updating an Existing File Handler

263