AEM 6.5 : Approach to avoid Cloud Manager AEM Rule for working listener implementation.
Hi All,
The error we are getting in CM is below
1] AEM-3[Non-thread safe object used as a field of Servlet/ Filter etc.]
Listener is working fine, but throwing above error for declaring session in our listener class which implements EventListener
private Session session ;
We are using this in activate() and deactivate() methods and looks like not possible to avoid the CM error.
2] Tried using Event Handler approach, wherein we want this to be invoked when page under certain path "/content/xxx" and few properties like "jcr:title"
are changed, the handler to be invoked for some custom processing.
Tried multiple things but no luck.
https://github.com/arunpatidar02/aem63app-repo/blob/master/java/TestEventHandler.java didnt work either.
3] Via ResourceChangeListener approach, resourceChange.getAddedPropertyNames()/resourceChange.getChangedPropertyNames(); are deprecated.
4] Is it possible to solve this issue with the above approaches mentioned?
5] If no to #4, Creating launchers/workflows is the only alternative to get this to work?
Any thoughts/pointers on this will be really helpful.