cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carsten Ziegeler <cziege...@apache.org>
Subject Re: svn commit: r156459 - in cocoon/trunk/src: blocks/xsp/java/org/apache/cocoon/components/language/programming/java/JavaProgram.java java/org/apache/cocoon/sitemap/ContentAggregator.java java/org/apache/cocoon/sitemap/DefaultContentAggregator.java
Date Wed, 09 Mar 2005 09:00:04 GMT
Sylvain Wallez wrote:
> Yes, of course. The new proxied-poolable feature recently added by 
> Carsten prevents casting a looked-up component to a specific class, as 
> the returned object is a proxy. That led to ClassCastExceptions.
> 
> That's why I introduced an additional interface for ContentAggregator, 
> as AggregateNode in TreeProcessor expects the generator used for 
> <map:aggregate> to be one to which the various <map:part> can be added.
> 
If you don't use the proxy but enable old pooling behaviour, you don't
need the extra interface - this worked already for usual aggregation,
see cocoon.roles:
  <role name="org.apache.cocoon.generation.Generator/&lt;aggregator&gt;"
        default-class="org.apache.cocoon.sitemap.DefaultContentAggregator"
        model="non-thread-safe-pooled"/>

But perhaps using interfaces is a better separation anyway :)

Carsten
-- 
Carsten Ziegeler - Open Source Group, S&N AG
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/

Mime
View raw message