cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anil <>
Subject Re: 2.1 components in 2.2
Date Tue, 18 Mar 2008 16:37:20 GMT

Hi - 

I'm writing my first generator & I've run into a problem which hopefully you
could help me with - I was able to create the generator & specify it in the
components part of the sitemap: i.e.:

<map:generator name="browseGenerator"

and access it within a sitemap pipeline:

<map:match pattern="generateBrowse" />
  <map:generate type="browseGenerator" />
  <map:serialize type="xml"/>

But ideally what I would like to do is specify the class for the generator
within the spring configuration (as there are properties I would like to set
within the bean).

I figured I could remove the <map:generator> declaration and define the
generator within the spring config, but the sitemap complains that it
doesn't know the browseGenerator I've defined within my spring config:

Type 'browseGenerator' does not exist for 'map:generate'

Could you clarify how I should use access the spring bean as a generator
within the sitemap? I know that the scope of the bean must be 'prototype'
but I can't seem to find any other information.

Do I need some other kind of configuration apart from an entry within the
application context & referencing the name of the bean in the application
context within the <map:generate>  declaration?

Any help would be gratefully received.

Many thanks,

Thorsten Scherler-3 wrote:
> On Tue, 2008-02-12 at 11:08 -0500, Edward S wrote:
>> Hi,
>> I have a few custom components (generators, readers etc.) written in
>> Cocoon 2.1.9
>> wanted to know, whether those will work in 2.2? if not, how easy will
>> it be to change the code to make them function?
> Quite easy. The only tricky thing is if you use spring configuration
> that you get e.g. the scope right. When we migrated some components to
> 2.2. we saw a lot of NPE while concurrency tests. Changing the scope to
> prototype did the trick.
> salu2
>> thanks
>> -Ed.
> -- 
> Thorsten Scherler                       
> Open Source Java                      consulting, training and solutions
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

View this message in context:
Sent from the Cocoon - Users mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message