4 Replies Latest reply on Oct 16, 2012 8:04 AM by dlofthouse

    Disable Configuration File history

    thomas_rasmussen

      Hey

       

      I'm testing out JBOSS AS 7 as a replacement for the JBOSS AS 6 we have been using so far. We are using Puppet to deploy both our applications in JBOSS and to deploy the JBOSS installation and configuration file. However I have noticed that JBOSS sometimes writes a reformatted configuration file and thus puppet keep saying that the configuration file has changed and needs to be updated. I have looked through a diff of the two files, and the only thing that is different is the indentation and some linebreaks in some tags.

       

      Now as we do not allow configuration files to be edited directly on the server, we want to disable this behavior together with the configuration file history as this is not needed as our puppet manifests and files are under revision control. However I have not found any options to disable this, so is it infact possible to disable? If so, how?

       

      We are running JBOSS AS 7.1.1 in standalone mode on Ubuntu linux.

       

      Best regards

      Thomas

        • 1. Re: Disable Configuration File history
          jaikiran

          Which exact files are you talking about? The configuration files (standalone.xml, domain.xml etc..) will be updated if there are any management model updates. However your title suggests that it's the history files which are being updated with just whitespaces, which is a bit strange. Can you tell us the exact file name? And does the same file keep getting updated everytime?

          • 2. Re: Disable Configuration File history
            thomas_rasmussen

            Sorry, I think I have mixed two different things. I wish to disable the automatic updates of standalone.xml ($JBOSS_HOME/standalone/configuration/standalone.xml) so this file will not be automatically saved by JBOSS.

             

            I know that I do not have any changes to JBOSS configuration while jboss is running, but it seems as though JBOSS will reformat the XML file (seems as though it converts tabs to whitespaces and re-indents the file).

             

            Right now I have copied the file saved by JBOSS to our puppet deployment server thus making sure that what puppet will deploy is what jboss will save, and then everything is OK for now, however when I then need to change something in the configuration file (via puppet) then it may or may reformat the file again and I may have to copy the file from jboss back to the puppet deployment server again.

             

            Hope this makes sense?

             

            Thomas

            • 3. Re: Disable Configuration File history
              wdfink

              As there are some configurations/informations (e.g. deployments) stored in the configuration files it is not possible to stop  JBoss from re-writing the files.

              The other thing is the re-formatting and dropped comments.

              • 4. Re: Disable Configuration File history
                dlofthouse

                A couple of points for this issue.

                 

                Firstly as JBoss AS is going to be re-writing the configuration files which does also result in some formatting changes why not store a JBoss AS written version as the base version?  Is there any reason this is not possible? 

                 

                Secondly I haven't tried this for a while but we do have command line options to pass in the configuration file to use instead of defaulting to standalone.xml - at one point this did allow an absolute path to the file outside of the JBoss AS installation folder and the file would only be read, JBoss AS would then continue to write updates to it's own standalone.xml keeping the original file untouched - if this is still working that way it may be an option for these environments where configuration is managed externally.  You will loose any management updates to the configuration as each start would be using the base file but that seems to be what is being asked for here anyway.

                 

                And finally if that doesn't work a final option could be to write your own start script that copied in your base configuration before staring the application server, that way you are always using the managed file and not the JBoss modified file.