Event Listener to Felix OSGI Container

Team, We are an issue in our product similar to the issue described in “javax.imageio - JAI ImageIO NoClassDefFoundError for RawImageInputStream - Stack Overflow”.

I can see from the link the we need to add the IIOProviderContextListener to fix it.

I wanted to know whether do we have any in box support to add listeners to OSGI container. If we have any support can you share the related document to it ?

If we do not have in built support can you share some sample code or doc to tweak the OSGI to make the listener work.