cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grzegorz Kossakowski <gkossakow...@apache.org>
Subject Re: [cocoon 2.2] Spring configuration of transformers
Date Wed, 12 Sep 2007 09:04:32 GMT
Raphaël Piéroni pisze:
>>  
>>> And this transformer have to access the database (DAO w/ transaction)
>>> that is defined with spring.
>>> But i can't manage to link the 2 information.
>>>     
>>
>> Is this transformer a Spring bean? Do you want to inject Spring bean
>> (a DAO) into some property of
>> transformer?
>>   
> Yup i try to inject the service wrapper arround the DAOs (with
> transaction - spring aop) in a field transformer/generator

Then configure your transformer as casual Spring bean and put configuration into
META-INF/cocoon/spring. If you wonder how to name your bean just use following pattern:
<fullyQualifiedNameOfInterfaceImplemented>/<nameOfComponentUsedInSitemap>

Where first part can have three values (respectively, for Generator, Transformer and Serializer).
This way of configuring sitemap components is preferred in Cocoon 2.2.

-- 
Grzegorz Kossakowski
Committer and PMC Member of Apache Cocoon
http://reflectingonthevicissitudes.wordpress.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message