How about a common template configuration file?

I met more complex condistion. I am working on a project in which  
each application require different ${configDir}.
A simple case looks  like:
configDir = /usr/local/my_project/prod/logs/app1/
configDir = /usr/local/my_project/prod/logs/app2/
configDir = /usr/local/my_project/prod/logs/app3/
configDir = /usr/local/my_project/prod/logs/app4/
.........
etc.

There are  dozens of such applications running. So I just use a  
common template configure file, which has a line
"configDir=/usr/local/my_project/prod/logs/$(appName)$(fileSeperator)".
When an application launches,  a pice of code will replace the  
variable $(appName) and $(appName) with related values and pass the  
configure information to the configurator.  Here each application use  
a different configure created from a common template. Of course, the  
configurator need to be extended with a method like  
doConfigureFromString() which can doConfigure on configure  
information created on the fly.

How about that  we can use one template file to configure apps  
running on different machines?
Maybe in the future we can load configure from a ldap server.

This can also be used on DOMConfigurator.

Jin


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to