You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Edward S <su...@gmail.com> on 2008/02/12 17:08:42 UTC

2.1 components in 2.2

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?

thanks

-Ed.

Re: 2.1 components in 2.2

Posted by anil <an...@btinternet.com>.

Hi everyone -

I've managed to figure out the answer, thanks to a posting I came across on
here, so I figured I'd link to it to help other people find the information
easily:

http://www.nabble.com/-cocoon-2.2--Spring-configuration-of-transformers-td12616843.html#a12631698
http://www.nabble.com/-cocoon-2.2--Spring-configuration-of-transformers-td12616843.html#a12631698 

Sorry I didn't see this before, but I was searching for configuration of
generators and I didn't see this page come up.

Hope this helps!
Anil.


-- 
View this message in context: http://www.nabble.com/2.1-components-in-2.2-tp15436509p16131938.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.


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


Re: 2.1 components in 2.2

Posted by anil <an...@btinternet.com>.
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"
src="com.semantico.generator.BrowseGenerator"/>

and access it within a sitemap pipeline:

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

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,
Anil.


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                                 thorsten.at.apache.org
> Open Source Java                      consulting, training and solutions
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/2.1-components-in-2.2-tp15436509p16125176.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.


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


Re: 2.1 components in 2.2

Posted by Thorsten Scherler <th...@juntadeandalucia.es>.
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                                 thorsten.at.apache.org
Open Source Java                      consulting, training and solutions


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