|
509 | 509 |
|
510 | 510 | <subsection name="StoreConfig Lifecycle Listener - org.apache.catalina.storeconfig.StoreConfigLifecycleListener"> |
511 | 511 |
|
512 | | - <p>The <strong>StoreConfig Lifecycle Listener</strong> configures a |
513 | | - StoreConfig MBean that may be used to save the current server configuration |
514 | | - in server.xml or the current configuration for a web application in a |
515 | | - context.xml file.</p> |
| 512 | + <p>The <strong>StoreConfig Lifecycle Listener</strong> enables persisting |
| 513 | + runtime configuration changes. When Tomcat's configuration is |
| 514 | + modified at runtime, for example, adding or removing a virtual host |
| 515 | + through the Host Manager, those changes only exist in memory and are lost |
| 516 | + on restart. This listener provides the ability to write the current |
| 517 | + in-memory configuration to <code>server.xml</code> (or an individual web |
| 518 | + application's <code>context.xml</code>), so that runtime changes are |
| 519 | + preserved across restarts.</p> |
| 520 | + |
| 521 | + <p>When this listener is enabled, configuration persistence can be |
| 522 | + triggered through the |
| 523 | + <a href="../host-manager-howto.html#Persist_command">Host Manager</a> and |
| 524 | + <a href="../manager-howto.html#Save_Configuration">Manager</a> applications. |
| 525 | + The listener compares the current configuration against |
| 526 | + default values and only writes attributes that differ from the defaults. |
| 527 | + Before overwriting <code>server.xml</code>, a backup of the existing file |
| 528 | + is created.</p> |
516 | 529 |
|
517 | 530 | <p>This listener must only be nested within <a href="server.html">Server</a> |
518 | 531 | elements.</p> |
|
523 | 536 | <attributes> |
524 | 537 |
|
525 | 538 | <attribute name="storeConfigClass" required="false"> |
526 | | - <p>The name of the <code>IStoreConfig</code> implementation to use. If |
| 539 | + <p>The name of the <code>IStoreConfig</code> implementation to use. |
| 540 | + This is an extension point for custom implementations. If |
527 | 541 | not specified the default of |
528 | 542 | <code>org.apache.catalina.storeconfig.StoreConfig</code> will be |
529 | 543 | used.</p> |
530 | 544 | </attribute> |
531 | 545 |
|
532 | 546 | <attribute name="storeRegistry" required="false"> |
533 | | - <p>The URL of the configuration file that configures how the |
534 | | - <code>IStoreConfig</code> is to save the configuration. If not specified |
535 | | - the built in resource |
| 547 | + <p>The URL of the configuration file that defines how each server |
| 548 | + component type (connectors, hosts, realms, valves, etc.) should be |
| 549 | + serialized to XML. This is an extension point for custom serialization |
| 550 | + rules. If not specified the built in resource |
536 | 551 | <code>/org/apache/catalina/storeconfig/server-registry.xml</code> will |
537 | 552 | be used.</p> |
538 | 553 | </attribute> |
|
0 commit comments