Author: markt
Date: Sun Dec 14 22:38:14 2014
New Revision: 1645533
URL: http://svn.apache.org/r1645533
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=57267
Add the following for the manager's save command:
- basic description in Manager Javadoc
- document the StoreConfigLifecycleListener
- add the /save command to the Manager How-To
Modified:
tomcat/tc8.0.x/trunk/ (props changed)
tomcat/tc8.0.x/trunk/java/org/apache/catalina/manager/ManagerServlet.java
tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml
tomcat/tc8.0.x/trunk/webapps/docs/config/listeners.xml
tomcat/tc8.0.x/trunk/webapps/docs/manager-howto.xml
Propchange: tomcat/tc8.0.x/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Dec 14 22:38:14 2014
@@ -1 +1 @@
-/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1638720-1638725,1639653,1640010,1640083-1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,1641064,1641300,1641369,1641374,1641380,1641486,1641634,1641656-1641692,1641704,1641707-1641718,1641720-1641722,1641735,1641981,1642233,1642280,1642554,1642564,1642595,1642606,1642668,1642679,1642697,1642699,1642766,1643002,1643045,1643054-1643055,1643066,1643121,1643128,1643206,1643209-1643210,1643216,1643249,1643270,1643283,1643309-1643310,1643323,1643365-1643366,1643370-1643371,1643465,1643474,1643536,1643570,1643634,1643649,1643651,1643654,1643675,1643731,1643733-1643734,1643761,1643766,1643814,1643937,1643963,1644017,1644169,1644201-1644203,1644321,1644323,1644516,1644523,1644529,1644535,1644730,1644768,1644784-1644785,1644790,1644793,1644815,1644884,1644886,1644890,1644892
,1644910,1644924,1644929-1644930,1644935,1644989,1645011,1645247,1645355,1645357,1645455,1645465,1645469,1645471,1645473,1645475
+/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1638720-1638725,1639653,1640010,1640083-1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,1641064,1641300,1641369,1641374,1641380,1641486,1641634,1641656-1641692,1641704,1641707-1641718,1641720-1641722,1641735,1641981,1642233,1642280,1642554,1642564,1642595,1642606,1642668,1642679,1642697,1642699,1642766,1643002,1643045,1643054-1643055,1643066,1643121,1643128,1643206,1643209-1643210,1643216,1643249,1643270,1643283,1643309-1643310,1643323,1643365-1643366,1643370-1643371,1643465,1643474,1643536,1643570,1643634,1643649,1643651,1643654,1643675,1643731,1643733-1643734,1643761,1643766,1643814,1643937,1643963,1644017,1644169,1644201-1644203,1644321,1644323,1644516,1644523,1644529,1644535,1644730,1644768,1644784-1644785,1644790,1644793,1644815,1644884,1644886,1644890,1644892
,1644910,1644924,1644929-1644930,1644935,1644989,1645011,1645247,1645355,1645357,1645455,1645465,1645469,1645471,1645473,1645475,1645487
Modified:
tomcat/tc8.0.x/trunk/java/org/apache/catalina/manager/ManagerServlet.java
URL:
http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/catalina/manager/ManagerServlet.java?rev=1645533&r1=1645532&r2=1645533&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/java/org/apache/catalina/manager/ManagerServlet.java
(original)
+++ tomcat/tc8.0.x/trunk/java/org/apache/catalina/manager/ManagerServlet.java
Sun Dec 14 22:38:14 2014
@@ -123,6 +123,11 @@ import org.apache.tomcat.util.res.String
* typically as a result of being placed there via the <code>/deploy</code>
* command.</li>
* <li><b>/vminfo</b> - Write some VM info.</li>
+ * <li><b>/save</b> - Save the current server configuration to server.xml</li>
+ * <li><b>/save?path=/xxx</b> - Save the context configuration for the web
+ * application deployed with path <code>/xxx</code> to an appropriately
+ * named context.xml file in the <code>xmlBase</code> for the associated
+ * Host.</li>
* </ul>
* <p>Use <code>path=/</code> for the ROOT context.</p>
* <p>The syntax of the URL for a web application archive must conform to one
Modified: tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml
URL:
http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml?rev=1645533&r1=1645532&r2=1645533&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml Sun Dec 14 22:38:14 2014
@@ -292,6 +292,10 @@
Oleg Trokhov. (kkolinko)
</fix>
<fix>
+ <bug>57267</bug>: Document the
<code>StoreConfigLifecycleListener</code>
+ and the <code>/save</code> command for the Manager application. (markt)
+ </fix>
+ <fix>
<bug>57323</bug>: Correct display of outdated sessions in sessions
count listing in Manager application. (kkolinko)
</fix>
Modified: tomcat/tc8.0.x/trunk/webapps/docs/config/listeners.xml
URL:
http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/webapps/docs/config/listeners.xml?rev=1645533&r1=1645532&r2=1645533&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/webapps/docs/config/listeners.xml (original)
+++ tomcat/tc8.0.x/trunk/webapps/docs/config/listeners.xml Sun Dec 14 22:38:14
2014
@@ -315,6 +315,40 @@
</subsection>
+ <subsection name="StoreConfig Lifecycle Listener -
org.apache.catalina.storeconfig.StoreConfigLifecycleListener">
+
+ <p>The <strong>StoreConfig Lifecycle Listener</strong> configures a
+ StoreConfig MBean that may be used to save the current server configuration
+ in server.xml or the current configuration for a web application in a
+ context.xml file.</p>
+
+ <p>This listener must only be nested within <a
href="server.html">Server</a>
+ elements.</p>
+
+ <p>The following additional attributes are supported by the
+ <strong>StoreConfig Lifecycle Listener</strong>:</p>
+
+ <attributes>
+
+ <attribute name="storeConfigClass" required="false">
+ <p>The name of the <code>IStoreConfig</code> implementation to use. If
+ not specified the default of
+ <code>org.apache.catalina.storeconfig.StoreConfig</code> will be
+ used.</p>
+ </attribute>
+
+ <attribute name="storeRegsitry" required="false">
+ <p>The URL of the configuration file that configures how the
+ <code>IStoreConfig</code> is to save the configuration. If not
specified
+ the built in resource
+ <code>/org/apache/catalina/storeconfig/server-registry.xml</code> will
+ be used.</p>
+ </attribute>
+
+ </attributes>
+
+ </subsection>
+
<subsection name="ThreadLocal Leak Prevention Listener -
org.apache.catalina.core.ThreadLocalLeakPreventionListener">
<p>The <strong>ThreadLocal Leak Prevention Listener</strong> triggers the
Modified: tomcat/tc8.0.x/trunk/webapps/docs/manager-howto.xml
URL:
http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/webapps/docs/manager-howto.xml?rev=1645533&r1=1645532&r2=1645533&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/webapps/docs/manager-howto.xml (original)
+++ tomcat/tc8.0.x/trunk/webapps/docs/manager-howto.xml Sun Dec 14 22:38:14 2014
@@ -933,6 +933,29 @@ OS information:
</subsection>
+<subsection name="Save Configuration">
+
+<source>http://localhost:8080/manager/text/save</source>
+
+<p>If specified without any parameters, this command saves the current
+configuration of the server to server.xml. The existing file will be renamed as
+a backup if required.</p>
+
+<p>If specified with a <code>path</code> parameter that matches the path of
+a deployed web application then the configuration for that web application will
+be saved to an appropriately named context.xml file in the <code>xmlBase</code>
+for the current Host.</p>
+
+<p>To use the command a StoreConfig MBean must be present. Typically this is
+configured using the <a
+href="config/listeners.html#StoreConfig_Lifecycle_Listener_-_org.apache.catalina.storeconfig.StoreConfigLifecycleListener">StoreConfigLifecycleListener</a>.
+</p>
+
+<p>If the command does not succeed, the response will start with
+<code>FAIL</code> and include an error message.</p>
+
+</subsection>
+
</section>
<section name="Server Status">
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]