Skip to main content
Level 4
Oct 16, 2015 2:27 AM UTC
Solved

How to invalidate cache in RolloutConfigManager?

Hi,
I am using CQ 5.5. When I remove a bundle with custom Live Action, this Live Action disappear in the Components tab (OSGI console).
But RolloutConfigManager still keep this Live Action in a cache.
How can I invalidate cache in Rollout Config Manager without restarting cq or disable/enable RolloutConfigManagerFactoryImpl?

- Alex.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Sham_HC
Sham_HCAccepted solution
Level 10
Oct 16, 2015 2:27 AM UTC

3 replies

Sham_HC
Sham_HCAccepted solution
Level 10
Oct 16, 2015 2:27 AM UTC

You can start & stop bundle using api http://www.osgi.org/javadoc/r4v43/core/org/osgi/framework/Bundle.html

Translate
Level 4
Oct 16, 2015 2:27 AM UTC

Thanks you Geoffroy.

I found that the cache invalidate after the modification under "/etc/msm/rolloutconfigs" folder.
I can add a modification property on activation and deactivation methods in custom Live Actions, but this solution doesn't look nice.
Is it possible to restart a bundle or component in java code?
Is it possible to send a lowest-level event(javax.jcr.observation.Event) from java code?

Do you know better way how to fix it in cq 5.5?

Translate
Adobe Employee
Oct 16, 2015 2:27 AM UTC

Hello Alex,

This is a known problem in cq 5.5 , only fixed starting CQ 5.6 .

In 5.5, the LiveActionFactories are loaded once and then cached, and there is no way to flush it apart from the solutions you mentioned, or also restarting the msm-core bundle.. 

In 5.6 a new mechanism has been introduced in the RolloutConfigManagerFactory, using a org.osgi.util.tracker.ServiceTrackerCustomizer to listen to OSGI changes on LiveActionFactory Services, and manages another cache of factories according to those changes.

Cheers,
Geoffroy

Translate