You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@aries.apache.org by Jason Wu <sa...@gmail.com> on 2013/05/25 03:12:52 UTC
Blueprint and setters that accept a java.util.Map
Hi,
I'm running into problems with using blueprint (aries 0.2.0-incubating
with ServiceMix 4.3.0). If I have a blueprint snippet like such:
<bean id="MyCustomMap" class="a.b.c.MyClassThatExtendsMap"
scope="singleton" /><!-- this class extends java.util.Map-->
<bean id="MyBean" class="a.b.c.MyClassThatAcceptsAMap">
<property name="customMap"><!-- this setter accepts java.util.Map<String,
Object>-->
<ref component-id="MyCustomMap" />
</property>
</bean>
MyCustomMap is instantiated correctly but it doesn't get fed into
MyBean.getCustomMap(). Blueprint seems to be instantiating its own Map (a
LinkedHashMap) and feeding that into MyBean. How can I correct this?