Wow. Thanks Nick for such a quick reply.
I've found the method calls you were talking about - DefaultListableBeanFactory.registerBeanDefinition( ) - and have got it to work. One thing I note is that if you do:
you lose the registered bean, so you can only really use this technique as a runtime thing or maybe perhaps as part of some sort of application bootstrapping.Code:wac.publishEvent(new ContextRefreshedEvent(wac));
Anyway, thanks again.