You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Joerg Heinicke <jo...@gmx.de> on 2007/09/20 00:40:33 UTC

Re: svn commit: r577245 - /cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/components/treeprocessor/variables/StringTemplateParserVariableResolver.java

On 19.09.2007 7:11 Uhr, gkossakowski@apache.org wrote:

> URL: http://svn.apache.org/viewvc?rev=577245&view=rev
> Log:
> COCOON-2134: Implemented Disposable interface in StringTemplateParserVariableResolver.

I wonder why a Spring-configured bean has to implement Avalon interfaces 
especially since it is an empty implementation anyway. Wouldn't it be 
better to make a instanceof check instead of enforcing the 
implementation? Otherwise I don't see how we can get rid of Avalon. We 
need such a migration path, don't we?

Joerg

Re: svn commit: r577245 - /cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/components/treeprocessor/variables/StringTemplateParserVariableResolver.java

Posted by Grzegorz Kossakowski <gk...@apache.org>.
Joerg Heinicke pisze:
> On 19.09.2007 7:11 Uhr, gkossakowski@apache.org wrote:
> 
>> URL: http://svn.apache.org/viewvc?rev=577245&view=rev
>> Log:
>> COCOON-2134: Implemented Disposable interface in
>> StringTemplateParserVariableResolver.
> 
> I wonder why a Spring-configured bean has to implement Avalon interfaces
> especially since it is an empty implementation anyway. Wouldn't it be
> better to make a instanceof check instead of enforcing the
> implementation? Otherwise I don't see how we can get rid of Avalon. We
> need such a migration path, don't we?

Thanks for reviewing, you have a good point.

The solution I came with was the simplest and most reliable I could think of. After taking another
look at the code from o.a.c.components.treeprocessor.variables.VariableResolverFactory class I start
to think that we could remove custom managment of Disposable components completely but I will be
better to have detailed look into that code later on.

-- 
Grzegorz Kossakowski
Committer and PMC Member of Apache Cocoon
http://reflectingonthevicissitudes.wordpress.com/