Grzegorz, On 30 Dec 2007, at 11:46, Grzegorz Kossakowski wrote:
Robin Wyles pisze:Hi I posted this a few weeks ago and I'm still searching for an answer... could anyone help?Hi Robin, Now I know what was the mail I forgot to reply ;-)
Hehe, I must admit when I first posted this question I was expecting a reply from you with your usual speed and alacrity :)
On 10 Dec 2007, at 12:09, Robin Wyles wrote:Hi,What I hope is a simple question... If I have a block A which depends on block B, can I override properties defined in block B by specifyingthem in block A? If this is possible, then I can't seem to get it to work - are there any special steps I have to take?Current situation with blocks is that they not offer complete isolation because it was too hard toimplement at the first time.It means that when you define properties in blocks they are visible everywhere. If you want to override and set the same property in another block you get conflict as you probably guessed. The solution that we offer at the moment for such situations is to resolve property files in analphabetic order (see[1]). Last definition of property wins.In order to override a property you just need to put it in a file named in a such way that you canbe sure it will be read as last. HTH.
I understand now, and of course when I specify my properties like this they do indeed override properly. It's also given me the opportunity to invent a new word "zoverride" of which I am very pleased!
[1] http://cocoon.apache.org/subprojects/configuration/1.0/spring- configurator/1.0/1310_1_1.html
I did read this when I was first trying to resolve this issue, but my eyes had kinda glazed over by point 8 and for some reason I didn't equate the alphabetical loading to the situation of overriding properties in dependent blocks. However, I now see that property files for all blocks must be evaluated together and so it makes perfect sense.
Thanks for your help, Robin
smime.p7s
Description: S/MIME cryptographic signature
