I have a client factory Spring bean defined as a singleton which includes a property called disabled. On startup of the app if the property is set to true, then the object factory will skip initializing and just return a null object.
My question is how can I accomplish changing the "disabled" property at runtime and have the factory create a client and vise versa? The goal here is to enable/disable the factory (and the client it initializes/reinitializes) without restarting the application. I have the disabled property defined/injected via contextroperty-placeholder.
Here's a gist of the factory in question: https://gist.github.com/1627584