AEM 6.3 Event problem
Hi,
I would need some help regarding the AEM events for the 6.3 beta.
So far we used simple EventHandlers to observe repository changes. Unfortunately the support for the ChangedAttributeNames etc values within the event seems to be gone.
When I realized this I tried to implement the documentation suggested ResourceChangeListener, unfortunately the event is missing the attribute change informations too. Last option was to implement a JCR event listener that works fine as long I register this listener to the observerManager of a session that I got via
session = repository.login( new SimpleCredentials( ... ) )
this for I need login credentials within the code what is pretty uncomfortable.
This shows me that the jcr event contains the information pretty well but this is not added to the sling events properly.
Additionally to this we needed to adapt our code to use
resolver = resourceResolverFactory.getServiceResourceResolver( paramMap )
instead of the old administrative resourceResolver call.
So my idea was to combine both and register the eventListener to the observerManager of the serviceResolver session.
After some debugging I realized that the session I get via the repository login call is working for this while the session of the service resource resolver is not because it gets closed and seems to be just a temporary one, what seems kill the workspace and the observermanager.
So is it possible somehow to avoid this problem somehow? Or maybe is it possible to set the path value of the observed node by additionally specifying a special attribute to be observed instead?
thx,
Sven