3 Replies Latest reply on Jul 2, 2006 7:58 PM by Javid Jamae

    Change running properties

    Brian Lucas Newbie

      We use a conf/local.properties file to set various properties used by our applications. For instance this properties file contains,

      test.helpdocs.url=http://localhost/helpdocs

      which when JBOSS starts, our application gets this property value and uses it throughout the application. We find that if we need to change this URL, we have to stop JBOSS, change the property, and the start it back up. Is there any way to change this property while JBOSS is running without having to restart?

      Thanks!
      a lost newbie

        • 1. Re: Change running properties
          Scott Stark Master

          Reread the file. jboss is not preventing you from picking up runtime changes.

          • 2. Re: Change running properties
            Brian Lucas Newbie

            Thanks for your reply and I hope you will forgive my ignorance on the inner workings of JBOSS. But how do I reread the file once JBOSS is going? Is there some command I can send to it while it's running to do that?

            • 3. Re: Change running properties
              Javid Jamae Newbie

              I don't think that the SystemPropertiesService scans more than once (when the app server starts). I think what Scott is trying to say is that you can write your own code to rescan these files on an interval to see if they have been updated.

              You might consider trying to extend the service class that is used to load the system properties:

              org.jboss.varia.property.SystemPropertiesService

              The MBean definition is in the deploy directory under properties-service.xml. You could extend it to add a rescan interval and some code that compares the timestamps of the properties files in the URL list.

              Good luck!