|
From: Andreas R. <ar...@gm...> - 2004-10-16 07:13:03
|
Am Freitag, 15. Oktober 2004 23:23 schrieb Luke Taylor:
> Hi,
>
> Are you loading the same resource twice? i.e. are parentResource and
> childResource the same?
No, the resources are different. In my example the two bean definitions are in
different resources.
> AFAIK the "singleton" or "prototype" definition
> only applies within a particular BeanFactory and defines the behaviour
> of calls to getBean. So if you load the same set of beans twice, you
> will end up with two "singleton" beans called "dao".
It should if it was the same resource. But I expect that if there is only one
bean definition for the 'dao' , there should be only one singleton instance.
Because XMLBeanFactory implements HierachicalBeanFactory!
regards
Andy
|