Services are not published
Hello,
I am using Spring DM 2.0.0.M1 and I am facing a basic problem (it seems).
In a single bundle:
- I have an interface A
- I have a basic implementation B of this interface A
- I have a consumer C which uses one instance of my service A
In the spring context:
- I create a bean of the basic implementation B and I publish it as a service of my interface A
- I create a bean of my consumer C which uses a required service A.
At runtime, the dependency "C requires A" is created (I saw it in log file), but B is never published as service so C is never available as well.
It works if I make one of the changes:
- I link C with the bean B instead of the service A
- I change the availabilty of the A service in C to "optional"
This shows that globally my project can work.
However, I don't want to link C with B because B is supposed to be an "emergency implementation" (ranking 0).
And I need the A service to be not-null, so the "optional" does not please me.
Have I to publish the B bean in a separate bundle?