view raw
light_303 light_303 - 5 months ago 76
Java Question

deactivate/disable OSGI component by name from external bundle

Is there a way to deactivate a given OSGI component by its name?

There is the

method - but it only works on components of the same bundle.

What is the best practice solution to do this without adding a new service to the given bundle to deactivate the component?


You can use the ServiceComponentRuntime service. It allows to introspect and manage any component.