I found out myself: adding a 'scope="prototype"' to the bean declaration makes quite a difference. It now is working as expected....
Rainer Rainer Pruy schrieb: > Hello, > > what is a working/recommended way of adding a custom generator bean > component for use with a (block local) sitemap? > > I tried using a generator.xml in > src/main/resources/META-INF/cocoon/spring of the block > > with the following content: > > ---------------------- > <?xml version="1.0" encoding="UTF-8"?> > <beans xmlns="http://www.springframework.org/schema/beans" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://www.springframework.org/schema/beans > http://www.springframework.org/schema/beans/spring-beans-2.0.xsd > http://cocoon.apache.org/schema/servlet > http://cocoon.apache.org/schema/servlet/cocoon-servlet-1.0.xsd"> > > <bean id="org.apache.cocoon.generation.Generator.research" > class="custom.generator"/> > > </beans> > > ---------------------- > > The class is included with the resulting block jar. > However, accessing it in the sitemap leads to > > --- > Type 'research' does not exist for 'map:generate' at > file:///..../sitemap.xmap:58:36 > > (The generator is referenced using type="research") > I also tried using id="research" and some other variations. > > Any documentation I came across just stated "any configured bean is > available". > But I seem missing an important point? > > Rainer > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- -- Rainer Pruy Geschäftsführer Acrys Consult GmbH & Co. KG Untermainkai 29-30, D-60329 Frankfurt Tel: +49-69-244506-0 - Fax: +49-69-244506-50 Web: http://www.acrys.com - Email: [EMAIL PROTECTED] Handelsregister: Frankfurt am Main, HRA 31151 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
