I like your approach. I am trying to do something like this to augment functionality in Spring Web Flow, essentially to load flow definitions at run time from an external source (i.e. not configured into the webflow xml). The SWF project uses a FactoryBean to create a FlowDefinitionRegistry bean.
Are you able to clarify a few questions?
1) What happens if SWF generates the bean via the factory, and my custom java configuration code also does this? Does the order of instantiation determine which bean is the one left in the Bean Registry?
2) Is it possible to trigger re-configurations of factory beans? I want to basically recreate a singleton bean using an event trigger.
It's worth noting that both the FactoryBean and the BeanDefinition exist already in the SWF project; what I'm seeking to do to configure the factory myself, both at startup and on demand.
Thanks in advance.