Versions Compared

Key

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

...

  1. If the bundle is stopped or if some required dependencies are unavailable, Invoke the stop method (annotated wit @Stop), and unregister eventual OSGi services (if the components provides some services). Any or if the component is deactivated by a factorySet, then:
    1. Unbind eventual optional dependencies (defined on callback methods). Notice that any optional dependency unavailability does not trigger the component deactivation
    , and
    1. the removed callbacks are just invoked, if declared in the annotation.
    2. Invoke the stop method (annotated wit @Stop), and unregister eventual OSGi services (if the components provides some services).
    3. invoke destroy method (annotated with @Destroy).
    4. invoke removed dependency callbacks, if any.

Example

The following example show a basic service, which uses the @Start, @Stop, annotation:

...