You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A `MODULENAME` must correspond to the MBean name of a system resource defined in your original `config.xml` file.
127
+
A `MODULENAME` must correspond to the MBean name of a system resource defined in your original `config.xml` file. It's not possible to add a new module via overrides. If you need your overrides to setup a new module, then have your original configuration specify 'skeleton' modules that can be overridden.
126
128
127
129
#### Override template schemas
128
130
@@ -184,24 +186,28 @@ The secret macro `SECRETNAME` field must reference the name of a Kubernetes secr
184
186
185
187
#### Override template syntax special requirements
186
188
187
-
**Check each item below to ensure custom situational configuration takes effect:**
189
+
**Check each item below for best practices and to ensure custom situational configuration takes effect:**
188
190
189
191
* Reference the name of the current bean and each parent bean in any hierarchy you override.
190
192
* Note that the `combine-mode` verbs (`add` and `replace`) should be omitted for beans that are already defined in your original domain home configuration.
191
-
* See [Override template samples](#override-template-samples) for examples.
193
+
* See [Override template samples](#override-template-samples) for examples.
192
194
* Use situational config `replace` and `add` verbs as follows:
193
195
* If you are adding a new bean that doesn't already exist in your original domain home `config.xml`, then specify `add` on the MBean itself and on each attribute within the bean.
194
196
* See the `server-debug` stanza in [Override template samples](#override-template-samples) for an example.
195
197
* If you are adding a new attribute to an existing bean in the domain home `config.xml`, then the attribute needs an `add` verb.
196
198
* See the `max-message-size` stanza in [Override template samples](#override-template-samples) for an example.
197
199
* If you are changing the value of an existing attribute within a domain home `config.xml`, then the attribute needs a `replace` verb.
198
-
* See the `public-address` stanza in [Override template samples](#override-template-samples) for an example.
200
+
* See the `public-address` stanza in [Override template samples](#override-template-samples) for an example.
199
201
* When overriding `config.xml`:
200
202
* The XML namespace (`xmlns:` in the XML) must be exactly as specified in [Override template schemas](#override-template-schemas).
201
203
* For example, use `d:` to reference `config.xml` beans and attributes, `f:` for `add` and `replace``domain-fragment` verbs, and `s:` to reference the situational configuration schema.
202
204
* Avoid specifying the domain name stanza, as this may cause some overrides to be ignored (for example, server-template scoped overrides).
203
205
* When overriding modules:
204
206
* It is a best practice to use XML namespace abbreviations `jms:`, `jdbc:`, and `wldf:` respectively for JMS, JDBC, and WLDF (diagnostics) module override files.
207
+
* A module must already exist in your original configuration if you want to override it; it's not possible to add a new module via overrides. If you need your overrides to setup a new module, then have your original configuration specify 'skeleton' modules that can be overridden.
208
+
* See [Overriding a data source module](#overriding-a-data-source-module) for best practice advice. Note that similar advice applies generally too other module types.
209
+
* Consider having your original configuration reference invalid usernames, passwords, and URLs:
210
+
* If your original (non-overridden) configuration references non-working usernames, passwords, and URLS, then this helps guard against accidentally deploying a working configuration that's invalid for the intended environment. For example, if your base configuration references a working QA database, and there is some mistake in setting up overrides, then it's possible the running servers will connect to the QA database when you deploy to your production environment.
205
211
206
212
#### Override template samples
207
213
@@ -240,6 +246,11 @@ The following `config.xml` override file demonstrates:
240
246
241
247
The following `jdbc-testDS.xml` override template demonstrates setting the URL, user name, and password-encrypted fields of a JDBC module named `testDS` via `secret macros`. The generated situational configuration that replaces the macros with secret values will be located in the `DOMAIN_HOME/optconfig/jdbc` directory. The `password-encrypted` field will be populated with an encrypted value because it uses a secret macro with an `:encrypt` suffix. The secret is named `dbsecret` and contains three keys: `url`, `username`, and `password`.
242
248
249
+
Best practices for data source modules and their overrides:
250
+
251
+
* A data source module must already exist in your original configuration if you want to override it; it's not possible to add a new module via overrides. If you need your overrides to setup a new module, then have your original configuration specify 'skeleton' modules that can be overridden. See the next two bullets for the typical contents of a skeleton data source module.
252
+
* Set your original (non-overridden) URL, username, and password to invalid values. This helps prevent accidentally starting a server without overrides, and then having the datasource successfully connect to a database that's wrong for the current environment. For example, if these attributes are set to reference a QA database in your original configuration, then a mistake configuring overrides in your production Kubernetes deployment could cause your production applications to use your QA database.
253
+
* Set your original (non-overridden) `JDBCConnectionPoolParams``MinCapacity` and `InitialCapacity` to `0`, and set your original `DriverName` to a reference an existing JDBC Driver. This ensures you can still successfully boot a server even when you have configured invalid URL/username/password values, your database isn't running, and/or you haven't been specified your overrides yet.
0 commit comments