Bertrand Delacretaz wrote > Hi, > > On Wed, Nov 9, 2016 at 10:46 AM, Carsten Ziegeler <[email protected]> > wrote: >> ...if the same client does so without adjusting the list >> of required names then the initializer might not be used either.... > > We can make this robust by having an explicit list of required > services, waiting for them to become available and complaining if > unlisted services of the same type appear. > > So for a dependency on a service S the client component is configured with > > S.required.roles = "roleA, roleB, roleC" > > And each instance of S must be configured with a "role" system property. > > And the component that uses them (or maybe a generic utility to handle > such cases, added to bundles/commons/osgi) waits until this exact list > of roles is available, and complains if it finds any S services > without a role. >
Right we can do this, but see my answer to Julian :) I think we don't need this for now as there is only one impl atm and I don'T see multiple impls in the near future. If so we can do as suggested. However, once you go with an approach like above you want to be able to add more roles without changing the initial configuration, something like the amendments for service users. And then we have a full blown complex solution, where in fact we just need enabled/disabled. Carsten -- Carsten Ziegeler Adobe Research Switzerland [email protected]
