Expand my Community achievements bar.

SOLVED

making a osgi component inactive

Avatar

Level 4

Hi,

is it possible to disable a component inside OSGI via an xml file similiar to the OSGIconfig. I want to disable com.adobe.granite.comments.internal.CommentReplicationContentFilterFactory.

Thanks

Chris 

1 Accepted Solution

Avatar

Correct answer by
Employee

Hi Chris,

In short no - there's no *universal* configuration-based way to stop a component. As Davide notes, some components allow you to effectively disable them using configuration, but for components which do not have such configuration, you need to stop the component manually via the web console or through code (using the ScrService).

Justin

View solution in original post

4 Replies

Avatar

Correct answer by
Employee

Hi Chris,

In short no - there's no *universal* configuration-based way to stop a component. As Davide notes, some components allow you to effectively disable them using configuration, but for components which do not have such configuration, you need to stop the component manually via the web console or through code (using the ScrService).

Justin

Avatar

Level 10

Can you please provide more details on what you want to do? It sounds like you want to dynamically disable an active OSGi bundle using XML or an API.  

Avatar

Level 4

You know how you can create a xml file eg

com.day.cq.rewriter.linkchecker.impl.LinkCheckerImpl.xml

and you can then place this inside your package and when this package is installed inside osgi the configurations are all set. Is there a similar method to disable the CommentReplicationContentFilterFactory component.

Chris

Avatar

Employee

That depends if the implementation of the service within a bundle allows you to disable it or not.

You could potentially stop via the felix console either the bundle or the OSGi component but I don't know what it could be the CQ behavior if you disable the CommentsReplication.