hi all,
i am currently running in a problem when using an injected map which is "aop:scoped".
here is some code:
initialization work fine but the following is the problem:Code:<bean id="mylist" class="org.springframework.beans.factory.config.ListFactoryBean" scope="request"> <property name="singleton" value="false"/> <property name="sourceList"> <list/> </property> <aop:scoped-proxy/> </bean>
but l.size() still returns "0"Code:ApplicationContext ctx = ... // do lookup List l = (List)ctx.getBean("mylist"); l.add("entry");![]()
when i remove the "<aop:scoped-proxy/>" element from the bean it work as expected and l.size() returns "1"
the same behaviour is when i use MapFactoryBean.
i can see in my debugger that List.add() is invoked but it seams like the any of the aop-proxy creates a new instance instead of returning the existing one.
this happens in 2.0.2 and 2.0.3
PS:
why does <util:map> not support "scoped" ?
regards
jan


Reply With Quote