You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "nicolas de loof (JIRA)" <ji...@apache.org> on 2006/12/07 09:14:22 UTC

[jira] Commented: (CONFIGURATION-237) Contrib : managed reloading strategy

    [ http://issues.apache.org/jira/browse/CONFIGURATION-237?page=comments#action_12456318 ] 
            
nicolas de loof commented on CONFIGURATION-237:
-----------------------------------------------

My commons-configuration is build inside Spring context :

    <bean id="configuration" class="....PropertiesConfiguration">
        <constructor-arg type="java.net.URL" value="file:${user.home}/custom.properties"/>
        <property name="reloadingStrategy" ref="reloadingStrategy"/>
    </bean>

    <bean id="reloadingStrategy" class="...ManagedReloadingStrategy"/>

The ManagedReloadingStrategy is itself a spring bean taht is set to the configuration bean. As a spring bean, I can make a ref to if from the MBeanExporter :

    <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>



I also made a contrib to spring-modules for building commons-configuration CompositeConfiguration inside Sprign context based on multiple Configuration beans. I'm using it to build a configuration from a classpath resource and a user-space properties file with managedReloadingStrategy for hot reloading properties.

> Contrib : managed reloading strategy
> ------------------------------------
>
>                 Key: CONFIGURATION-237
>                 URL: http://issues.apache.org/jira/browse/CONFIGURATION-237
>             Project: Commons Configuration
>          Issue Type: New Feature
>    Affects Versions: Nightly Builds
>            Reporter: nicolas de loof
>            Priority: Minor
>         Attachments: CONFIGURATION-237.patch, ManagedReloadingStrategyTest.java
>
>
> This patch adds a reloading strategy based on management request, typically from a JMX console. The Strategy implements a MBean interface so can be exported as a JMX Managed bean with no code change.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org