Hi

We are developing a platform based on bundles
Our products are based on this platform.
product = platform bundles + product specific bundles

A product can change the behaviour of the platform by implementing
singleton OSGi services


We would like make these service optional but it's not easy
Therefore if the platform doesn't find such a service there too
possibilities
- the product doesn't implement this service. The platform behaviour stay
unchanged, alright
- the product intends to implement the service in a bundle but the bundle
that implement this service is broken. In this case the product has not the
right behaviour

The complex solution that we implement is
Such service is seen as mandatory by the platform and the platform has a
default implementation of the service in a bundle .
The build of the product removes this bundle and bring its own bundle

This build is error-prone and expensive to realize.

Do have an idea how we should have optional service but detect if the
product intends to implement the service (without integration tests in the
product that test the correct behaviour) ?

An idea for instance
If the service are declare with @Component
Scan every MANIFEST.MF to find pretty exactly which services are intended
to be implemented

Best regards

Serge
  • [no subject] Serge Démoulin
    • Re: João Assunção
    • Re: JB Onofré
      • Re: David Jencks

Reply via email to