cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leszek Gawron <lgaw...@mobilebox.pl>
Subject Re: Restructuring directory structure[was [Vote] Block artifact directory structure]
Date Sat, 04 Nov 2006 15:34:13 GMT
Giacomo Pati wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> 
> 
> Leszek Gawron wrote:
>> Giacomo Pati wrote:
>>> -----BEGIN PGP SIGNED MESSAGE-----
>>> Hash: SHA1
>>>
>>>
>>>
>>> Leszek Gawron wrote:
>>>> Carsten Ziegeler wrote:
>>>>> Giacomo Pati wrote:
>>>>>> Just to clear things:
>>>>> :)
>>>>>
>>>>>> Carsten Ziegeler wrote:
>>>>>>>> Done - with the additional change discussed recently, so
now we
>>>>>>>> have:
>>>>>>>>
>>>>>>>>>>> META-INF/cocoon/avalon/**
>>>>>>>>>>> META-INF/cocoon/spring/**
>>>>>> plus ev. mode subdir {dev,test,proc}
>>>>>>
>>>>> Yes, but only for the properties! It's simple to add this for reading
>>>>> avalon and spring configurations, if desired?!?
>>>> I heard somewhere on the list that some developers (Giacomo?) where
>>>> using property placeholders for defining mock beans.
>>> Yup,that was me. Before one could do that which has been handy together
>>> with different modes:
>> OK, lets enable cocoon modes for META-INF/cocoon/spring/ and
>> META-INF/cocoon/avalon
> 
> I thought modes are already enabled but it's not about mode, its about
> the ability to use properties replacement in
> 
> 	<bean class="${...}">

with cocoon modes enabled for spring you can do something like this:

in META-INF/cocoon/spring/myContext.xml:

<bean id="myService" class="com.mycompany.MyServiceImpl">
   <property name="myDao" ref="myDao"/>
</bean>

and then

in META-INF/cocoon/spring/dev/daos.xml:
<bean id="myDao" class="com.mycompany.MyMockDaoImpl"/>

in META-INF/cocoon/spring/prod/daos.xml:
<bean id="myDao" class="com.mycompany.MyActualDaoImpl"/>

-- 
Leszek Gawron                                    CTO at MobileBox Ltd.


Mime
View raw message