This conversation has been locked due to inactivity. Please create a new post.
This conversation has been locked due to inactivity. Please create a new post.
Hi all,
Looks like the JCR event listener in 6.4 is broken. Events dont get triggered at all. Is anyone else facing the same issue? Is there any solution?
Solved! Go to Solution.
Hi Scott,
It does work with system user as well. But you need JCR repository session in order to get jcr events work.
Below code works for me.
aem63app-repo/SampleJCREvent.java at master · arunpatidar02/aem63app-repo · GitHub
@Reference | |
private SlingRepository repository; | |
private Session session; | |
private ObservationManager observationManager; | |
protected void activate(ComponentContext context) throws Exception { | |
session = repository.loginService("readService",null); | |
observationManager = session.getWorkspace().getObservationManager(); | |
observationManager.addEventListener(this, Event.PROPERTY_ADDED | Event.PROPERTY_CHANGED, "/content/AEM64App/fr", true, null, | |
new String[]{"cq:PageContent","nt:unstructured"} , true); | |
logger.info("*************added JCR event listener"); | |
} |
Views
Replies
Total Likes
@arunpatidar, Yes, I have. but event is not triggering. is there anything i need to verify?
Views
Replies
Total Likes