Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
// Dependency Manager callback method
protected final void someServiceAdded(ServiceReference<T> reference, T service) {
  //do something 
}

Best practices

...

Defining external non-OSGi libraries as macros

Defining external non-OSGi libraries as macros makes it easier to maintain them, especially libraries which depend on a great variety of other libraries themselves as well.
Using the following approach, the library is defined in one place together with it's dependencies. The library can then easily be included on the build path as a single macro without having to reference a multitude of files and having to update them all throughout the entire project where needed.
Another bonus is that it allows easy use of multiple implementations which depend on the same libraries.

...