|
From: Leif M. <le...@ta...> - 2003-09-03 06:54:28
|
Max, Originally, the Wrapper's property file worked almost exactly like the java.util.Properties class. However there have been a couple features which have caused it to diverge slightly. 1) The ability to set environment variables. It is possible to define a property like the following: set.JAVA_HOME=../jre This value can then be used as follows: wrapper.java.command=%JAVA_HOME%/bin/java Environment variables in the properties file are expanded as the properties are loaded from the file. For this reason, it is necessary to define the environment variable at a point in the file before it is used. 2) Include files. It is possible to specify other properties files that will be recursively read in at the point that they are declared. Properties defined in the include files follow the above rule. 3) I think this is the same as the java Properties class, but any properties that are defined more than once will end up with the value declared last. Once all of the properties are loaded however, they are accessed as a hash map so there should be absolutely no further dependency on the order of the properties in the file. Would it be possible for you post exactly what properties are causing you problems? What you are describing, with the above exceptions, should not be happening, so I would like to see what you are referring to. Cheers, Leif Max Stolyarov wrote: > Leif, > > I wrote a code to dynamically modify wrapper.conf file in order to on > the fly change NT service's name, display name, and service > description parameters. When I analyzed this file, I though that this > is a simple properties file that you probably read and then apply > internally. Because of this, I thought that the order in which > parameters appear in the file does not matter. Apparently I thought > wrong. In my file, parameters were in different order then in your > file, and when I tried to install the wrapper and run my application > as a service, it did not; the NT service did not start. In order to > trouble shoot the problem, I replaced my file with your wrapper.conf > file, tried to load and start the service again and it worked. (Number > of parameters in each file is the same). Therefore, I feel that for > some reason or not, the order in which parameters appear in your > wrapper.conf file is very important. Can you please let me know why > did you handle properties in such a way? Also, if this is not > something you planned for can you please update file that reads > configuration properties, to first read it and then apply them, so > that the order in which they appear in the Config file is not > important. Thanks in advance. > > Max > |