cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giacomo Pati <giac...@apache.org>
Subject Re: Property overwriting mechanism
Date Tue, 07 Nov 2006 16:00:20 GMT
Ok, I think I've found the bug.

The CPOC had a section where it was *always* loading the general overwriting
properties files. This has lead to the NoSuchBeanDefinitionException during
request handling where a different beanFactory (the one for the sitemap, not
the global one) was used which didn't had the bean trying to overwrite!

So far I've committed this fix.

Question remaining:

Is it necessary to load those property files (probably for the sitemap
beanFactory) for each request?

Ciao

Giacomo Pati wrote:
> I've debugged a little further on.
> 
> I've figured that the method CocoonPropertyOverrideConfigurer#postProcessBeanFactory
> is called once during startup and once for each request (is that necessairy to load
> and process it for every request????).
> 
> The call during startup is processed correctly (to my limited knowledge) as it can
> find the bean for the overwriting property values.
> 
> But, the beanFactory passed into mentioned method at request time is a different
> one and doesn't has the bean in question. So the underlying Spring machinery throws
> a NoSuchBeanDefinitionException.
> 
> Carsten, is the beanFactory passed into mentioned method above at request time the
> one specific to a sitemap? The base PropertyOverrideConfigurer class
> CocoonPropertyOverrideConfigurer extends from has a set setIgnoreInvalidKeys()
> method to prevent throwing such an exception, but is this feasable to do?
> 
> Ciao
> 

-- 
Giacomo Pati
Otego AG, Switzerland - http://www.otego.com
Orixo, the XML business alliance - http://www.orixo.com


Mime
View raw message