1 Reply Latest reply on Nov 10, 2003 11:34 AM by Ivan O. Parra

    change config file at run-time in WAR/EAR?

    Pedro Salazar Newbie


      I would like to have a XML/properties file in my WAR/EAR file to define a default configuration of my application. But, I would like to change dynamically its configuration. How could I do that in a way that my original WAR/EAR file must be also updated in the case of a J2EE application server.

      A very good example is LOG4J. There is a properties/XML file that we would like to change at run-time. In TOMCAT, the WAR file is expanded so we could change the in the expanded directory, and there is no problem when restart the TOMCAT because it would use the expanded structure.

      In the case of a J2EE application server, JBOSS for instance, there is a deploy directory where we put a WAR/EAR file. In this case we can't change directly the XML file because is packed. We could do is going through the application change the default values. The question is how to make that values be updated in the XML/properties for the case of a restart the application server??

      I don't know if I make clear my point of view...

      Any one know any pattern or hints to solve my problem here?

      Pedro Salazar.