cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carsten Ziegeler <cziege...@apache.org>
Subject Re: Bean overriding.
Date Tue, 09 Jan 2007 15:05:52 GMT
Leszek Gawron wrote:
> Carsten Ziegeler wrote:
>> Leszek Gawron wrote:
>>> One would like to provide a totally new implementation of core component
>>> (i.e. store, continuations manager etc.). The current version of the
>>> component will be loaded anyways (the bean definition resides somewhere
>>> in cocoon-core.jar/META-INF/cocoon/spring/*.xml). Defining a new bean of
>>> the same name will throw a nasty exception. What should the user do?
>>>
>> As far as I know, you'll not get an exception and the last definition is
>> used.
> 
> What is the 100% reliable way to make the definition I want the last one?
> 
The configuration files are applied in alphabetical order, so the name
of your configuration file should be after the name of the provided
configuration.
In addition, all configuration files from
/WEB-INF/classes/META-INF/cocoon are applied after all configuration
files from jars. So putting something here is the safest way!

Btw, we should use a naming schema for our configuration files to
provide a naming contract people can rely on when trying to override
configurations (the contract could be as simple as to require that all
file names start with "cocoon-". So anything after "c" can overwrite.

Carsten
-- 
Carsten Ziegeler - Chief Architect
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/

Mime
View raw message