Assuming I use OSGi Declarative Services and I have a service that have a number references with policy = dynamic...
A - Mandatory unary.
B - Mandatory unary.
C - Mandatory multiple.
D - Optional unary.
E - Optional multiple.
All references are available when my service starts. Is there any way to control what order bind is called in?
I'd like to have B bind first and do something to each E that comes in, but I have no way of ensuring that B is bound before E.
Yes, the more logical approach would be to let the service that represents B also bind to E and do whatever it should do, but I can't modify B, I can only use it. If I make a new service that just binds to B and E I'll have the same problem still.
I could do whatever I need to do in the activate method when everything is bound, and then do it as additional (dynamic) E's are bound, but I was wondering if there is another way...