Carsten Ziegeler wrote:
In the last days I converted our FileGenerator from an Avalon based
component to a spring managed bean. With spring we have the advantage
that we don't need a special GeneratorFactory interface anymore. Spring
supports several ways of instantiation which is totally transparent to
the client code.
While implementing the FileGenerator I noticed a problem: how can we
configure sitemap specific stuff like the label or the mime-type for
spring managed beans?
The current avalon implementation has a special handling for sitemap
components and stores the label/mime-type information which is then
later used by the tree processor.
With spring we don't have such a mechanism.
Has anyone a good idea how to solve this?
What's wrong with property injection? (I'm asking because you certainly know
about it ;-) ):
<bean name="o.a.c.s.s/mySerializer">
<property name="mime-type" value="text/xml"/>
</bean>
and the label is the name after the slash, in this case "mySerializer". It's not
the most elegant way but with C3 we can reconsider it.
--
Reinhard Pötz Independent Consultant, Trainer & (IT)-Coach
{Software Engineering, Open Source, Web Applications, Apache Cocoon}
web(log): http://www.poetz.cc
--------------------------------------------------------------------
___________________________________________________________
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de