Jul 25th, 2006, 09:33 AM
Resolving bean references without instantiating
I have a situation where I am creating a new XMLBeanDefinitionReader with a new GenericApplicationContext, using a URLClassLoader pointing to a newly installed jar file on my system.
This jar file contains a context file referencing singleton beans that have ALREADY been instantiated by another GenericApplicationContext. I would like to pass a reference to this AppContext to my new AppContext so it can resolve these references without instantiating the singletons again. I know that setParent works for this, but I have multiple ApplicationContexts, and it's not really a parent/child hierarchy.
Is there any way for my new AppContext to resolve these references without re-instantiating the beans?