Customizing instantiation logic with a FactoryBean