light_303 light_303 - 1 year ago 133
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?

Answer Source

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download