You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by oh...@apache.org on 2014/05/24 15:55:27 UTC
svn commit: r1597295 - in
/commons/proper/configuration/trunk/src/site/xdoc/userguide:
howto_reloading.xml user_guide.xml
Author: oheger
Date: Sat May 24 13:55:27 2014
New Revision: 1597295
URL: http://svn.apache.org/r1597295
Log:
Added a sub section about managed reloading to the reloading chapter.
This is an adapted version of the original documentation about the managed
reloading strategy supported in version 1.x.
Modified:
commons/proper/configuration/trunk/src/site/xdoc/userguide/howto_reloading.xml
commons/proper/configuration/trunk/src/site/xdoc/userguide/user_guide.xml
Modified: commons/proper/configuration/trunk/src/site/xdoc/userguide/howto_reloading.xml
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/site/xdoc/userguide/howto_reloading.xml?rev=1597295&r1=1597294&r2=1597295&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/site/xdoc/userguide/howto_reloading.xml (original)
+++ commons/proper/configuration/trunk/src/site/xdoc/userguide/howto_reloading.xml Sat May 24 13:55:27 2014
@@ -339,6 +339,42 @@ builder.addEventListener(ConfigurationBu
});
]]></source>
</subsection>
+
+ <subsection name="Managed Reloading">
+ <p>
+ <code><a href="../apidocs/org/apache/commons/configuration/reloading/ManagedReloadingDetector.html">
+ ManagedReloadingDetector</a></code> is an alternative to automatic
+ reloading. It allows to hot-reload properties on a running application,
+ but only when requested by an administrator. The detector class defines a
+ <code>refresh()</code> method which forces a reload of the configuration
+ source the next time a reloading check on the associated
+ <code>ReloadingController</code> is triggered.
+ </p>
+ <p>
+ A typical use of this feature is to setup <code>ManagedReloadingDetector</code>
+ as a JMX MBean. The following code sample uses Spring framework's
+ <code>MBeanExporter</code> to expose the managed reloading detector to the
+ JMX console:
+<source>
+<![CDATA[
+<!-- The managed reloading detector for the configuration builder -->
+<bean id="reloadingDetector" class="...ManagedReloadingDetector"/>
+
+<!-- The MBeanExporter that exposes reloadingDetector to the JMX console -->
+<bean id="mbeanMetadataExporter" class="org.springframework.jmx.export.MBeanExporter">
+ <property name="server" ref="mbeanServer"/>
+ <property name="beans">
+ <map>
+ <entry key="myApp:bean=configuration" value-ref="reloadingStrategy"/>
+ </map>
+ </property>
+</bean>
+]]>
+</source>
+ With this configuration, the JMX console will expose the
+ "myApp:bean=configuration" MBean and it's refresh operation.
+ </p>
+ </subsection>
</section>
</body>
</document>
Modified: commons/proper/configuration/trunk/src/site/xdoc/userguide/user_guide.xml
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/site/xdoc/userguide/user_guide.xml?rev=1597295&r1=1597294&r2=1597295&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/site/xdoc/userguide/user_guide.xml (original)
+++ commons/proper/configuration/trunk/src/site/xdoc/userguide/user_guide.xml Sat May 24 13:55:27 2014
@@ -101,6 +101,7 @@
<li><a href="howto_reloading.html#Reloading_File-based_Configurations">Reloading File-based Configurations</a></li>
<li><a href="howto_reloading.html#Generic_Reloading_Support">Generic Reloading Support</a></li>
<li><a href="howto_reloading.html#Reloading_Checks_on_Builder_Access">Reloading Checks on Builder Access</a></li>
+ <li><a href="howto_reloading.html#Managed_Reloading">Managed Reloading</a></li>
</ul>
<li><a href="howto_compositeconfiguration.html#Composite_Configuration_Details">Composite Configuration Details</a></li>
<ul>