I was browsing through the breed of IoC (Inversion of Control) Frameworks like PicoContainer & Spring. I have one simple question for the proponents of these frameworks.

I come from the old camp where we merrily use Service Locator Pattern for solving the same problems that IoC addresses. We face two typical problems in a Service Oriented Architecture.

Assume that a service A (defined by the interface) is provided by B, C & D implementations. Assume that they all have registered. Now I know that C is superior service provider than B. I also know that D is the best. However D may not be available at all times. So we may need to fallback on C, when D is unavailable. My first simple question is how do you pass on this information in a distributed environment when each of these services are provided by different Service providers. How do we, as a standard, address QoS rules?

Now assume that each of these services have hot-swappable components. B has E & F, D has H & J etc. We need to specify that in a generic fashion meta-data about the service addressing QoS and other concerns like specifying order or usage, graceful decline etc.

How does modern IoC frameworks address this?