Maybe I mis-understand the behaviour of the bean factory which is very possible
My understanding is that a beanFactory will look in it's current context *and it's parent context* for a bean.
The code
Code:
// Create child ApplicationContext for views.
GenericWebApplicationContext factory = new GenericWebApplicationContext();
factory.setParent(getApplicationContext());
factory.setServletContext(getServletContext());
constructs a factory which has visible of the applicationContext. Sure, the link
Code:
reader.loadBeanDefinitions(actualLocation);
specificies your actualLocation, but the reader is constructed with that parent factory.
My interpretation is that "loadBeanDefinitions" will *add* the beans defined in the specified location, but you still have access to the parent context.
Maybe one of the spring team could answer this?