cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grzegorz Kossakowski <g...@tuffmail.com>
Subject Does configurator:bean-map support Spring aliases?
Date Mon, 02 Jul 2007 20:31:33 GMT
Hi,

I use configurator:bean-map to grab all Expression languages' compilers:

   <bean id="org.apache.cocoon.components.expression.ExpressionFactory" 
class="org.apache.cocoon.components.expression.DefaultExpressionFactory">
     <property name="expressionCompilers">
       <configurator:bean-map type="org.apache.cocoon.components.expression.ExpressionCompiler"/>
     </property>
   </bean>

Now I would like to define JXPath language as default (it was that way before) so it's quite
obvious to define Spring's alias[1] for JXPath 
bean:

<bean name="org.apache.cocoon.components.expression.ExpressionCompiler/jxpath 
org.apache.cocoon.components.expression.ExpressionCompiler/default" class="org.apache.cocoon.components.expression.jxpath.JXPathCompiler"/>

The problem is that bean-map does not add all aliases of bean but only the first one. I guess
that it could be fixed by using getAliases 
method[2] and adding all aliases to bean-map.

Do you think that it's a good idea?

[1] http://static.springframework.org/spring/docs/2.0.x/reference/beans.html#beans-beanname
[2] http://www.springframework.org/docs/api/org/springframework/beans/factory/BeanFactory.html#getAliases(java.lang.String)

-- 
Grzegorz Kossakowski
http://reflectingonthevicissitudes.wordpress.com/

Mime
View raw message