cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carsten Ziegeler <cziege...@apache.org>
Subject Re: Confusion about property-based beans configuration
Date Thu, 25 Oct 2007 04:30:14 GMT
Hi,

Grzegorz Kossakowski schrieb:
> Hello,
> 
> I'm just trying to use propertu-based configuration of Spring beans and I'm facing several
problems.
> First of all there is some confusion about correct syntax, at[1] there is information
that syntax is
> as follows:
> my.special.beanName#property=somevalue
> 
> However, when taking a look at ExtendedPropertyOverrideConfigurer[2] class I see this
comment:
>  * Our version of the property override configurer which reads properties from
>  * the Cocoon spring configuration directory. A property should have the
>  * following format: {bean name}/{property name}={value}.
> 
> The question is: which syntax is correct?
The javadoc is correct, "/" is used as the separator.

> 
> Another one is about location of property files taken into account when updating beans'
definitions.
>   The mentioned page states that location is:
> /META-INF/cocoon/spring
> 
> but I wonder how this relates to the block structure explained here[3]? At that page
we can see that
> default location for properties is:
> /META-INF/cocoon/properties/
> 
We distinguish between properties for configuring the application and
overriding bean definitions. The first one uses
/META-INF/cocoon/properties and all these values end up in the Settings
object. The properties can be used throughout the whole application and
references can occur in most configuration files like avalon configs,
spring bean configs, sitemaps etc.

The bean override configuration is a special mechanism to override
settings of beans. There we use all files from /META-INF/cocoon/spring
to detect such things.

So we have a clear separation between these two issues.

Carsten
> 
> I'm little bit confused, could someone explain this inconsistency?
> 
> [1] http://cocoon.apache.org/subprojects/configuration/1.0/spring-configurator/1.0/1312_1_1.html
> [2]
> http://svn.apache.org/repos/asf/cocoon/trunk/core/cocoon-configuration/cocoon-spring-configurator/src/main/java/org/apache/cocoon/spring/configurator/impl/ExtendedPropertyOverrideConfigurer.java
> [3] http://cocoon.zones.apache.org/daisy/cdocs/g1/g1/g4/1263.html
> 


-- 
Carsten Ziegeler
cziegeler@apache.org

Mime
View raw message