The premises of this question is that I have URLs which changes based on the WAS installation box so I would like to hardcode the url as a property. I wanted to know which would be best between using properties file, system environment properties and resource environment entries.
I though that properties file would involve changing the source code for each environment. Resource environment entries on the other hand is too much work (Resource URL) and also it is exposed to the whole cluster and not that particular server.
I liked using the application server process definition since I only need to add an entry to
Application servers > server1 > Process Definition > Java Virtual Machine > Custom Properties
and this can be invoked by
I generally prefer keeping such information in either property files OR defining them as Resource URL.
Property files are the most flexible way of handling it as you can change it using build scripts or manually.
posted 9 years ago
Controlling it via the build makes sense and we were doing that earlier but somehow ever since I shifted it to the server properties I felt that was better since I could just tweak my server properties and all the ears running inside that cluster gets fixed instead of changing individual build scripts.
Not sure if this is the best but I felt it reduced a lot of effort when moving environments.
Let nothing stop you! Not even this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!