[Yanel-dev] Environment specific configurations

Michael Wechner michael.wechner at wyona.com
Wed Dec 22 15:08:05 CET 2010


Hi Balz

On 12/22/10 12:57 PM, Balz Schreier wrote:
> Hi,
>
> I would like to know something in the area of the distribution process 
> (building the Yanel WAR and Realm ZIP for final deployment):
>
> - Is there a mechanism available to define certain configuration 
> snippets in some files depending on the environment that you are going 
> to build it? Let's say: in the web.xml of Yanel on the TEST 
> environment, I'd like to have ssl-port 8443 configured, in PROD it 
> would be 443.
>
> - If there is such a mechanism in place, what files can be configured 
> with this?
>
> Currently, my distribution contains the PROD values, and if I deploy 
> to TEST, I have to change two parameters at this moment (web.xml Yanel)

we normally do this through a "distribution/release" script (or ant 
build) which you can configure and hence is copying different versions 
of these configuration files into the WAR or just patches them.

Another possibility would be of course to use Environment properties as 
we do for finding the realms.xml file,
which would overwrite the ones from the configuration files. See for example

src/core/java/org/wyona/yanel/core/map/RealmManager.java#getRealmsConfigFile(...)

but so far only the "realms.xml" is overwritten like this.

HTH

Michael
>
> Cheers
> Balz



More information about the Yanel-development mailing list