Giacomo Pati wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



Carsten Ziegeler wrote:
Leszek Gawron wrote:
Carsten Ziegeler wrote:
Sorry, I got totally lost in all these mails. As far as I understand we
are currently discussing when/where it's possible to set the running mode.
There are two places: applicationContext.xml and system property. The
system property takes precedence over the applicationContext.xml. I'm
not sure which role cocoon.xconf should play in this?
I think everyone means applicationContext.xml. I happend to put the wrong name in the first place.

:) OK, fine, so is there still a problem?

Actually, yes, the problem is still there. If I understand Leszek
correctly, we do have to places in code where we examine the running
mode with the same algorithm.

I actually have two problems:

1. IMO cocoon components should either use Settings.getRunningMode() to get the current running mode or have the mode injected. Allowing components to determine the running mode using any algorithm (even the easiest one) leads to inconsistencies.

2. Some components (like CocoonOverridePropertyConfigurer, which has already been fixed) use the Settings object but happily fallback to default mode when settings object is not available. The result of such situation is that a bean that has been incorrectly dependence injected uses other running mode than you might think. Beans using running mode should simply throw if they cannot determine one.

I am probably picky about this but hey - you're the ones I've learnt my values from :)

--
Leszek Gawron                                    CTO at MobileBox Ltd.

Reply via email to