Yes, I understand your point. But for me is like where you need to resolve the dependencies of a bundle. It is true that the bundle cannot work without having its dependencies resolved and thus, is blocking for the bundle initialization.
The same thing (but at different level) is for me the configuration of the bean. If one bean in the bundle is a singleton, and that bean needs a configuration. I don't see the point to having the bean initialized without the configuration.
Talking with xml, you configure a singleton with managed props like this:
My complain is that the bean is created without configuration.
<bean id="managedComponent" class="MessageTank">
What would be great is to have something (similar to factory) like:
Which would mean: Instantiate a singleton "com.xyz.MessageTank" when the configuration with pid com.xyz.messageservice arrives. If the configuration does not arrives, the service will not be available.
<osgix:managed-propeties pid="com.xyz.messageservice" auto-export="interface"> ·
<bean class="com.xyz.MessageTank"/> ¸
This way we know the singleton is there, and available as a service, only when its configuration arrives.