|
From: Andreas R. <and...@ya...> - 2004-10-15 11:13:09
|
Hi,
no answer so far :-(
Maybe my question wasn't clear enough.
I have two BeanFactories:
parentContext:
<bean id="dao" class="example.DaoImpl"/>
childContext:
<bean id="service" class="example.ServiceImpl"/>
BeanFactory parent = new
XMLBeanFactory(parentResource);
Dao dao1 = (Dao) parent.getBean("dao");
BeanFactory child = new
XMLBeanFactory(childResource,parent);
Dao dao2 = (Dao ) child.getBean("dao");
--> Result dao1 and dao2 are NOT the same. I expected
that they must be the same
if the bean is defined as a singleton.
In AbstractBeanFactory.geBean(String name, Object[]
args) you don't search a instance in the
singletoncache
of the parent beanfactory. Why? Is it an error ?
Regards
Andreas
___________________________________________________________
Gesendet von Yahoo! Mail - Jetzt mit 100MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de
|