ResourceChangeListener onChange event not getting trigger | Community
Skip to main content
Level 2
April 23, 2019

ResourceChangeListener onChange event not getting trigger

  • April 23, 2019
  • 1 reply
  • 8807 views

Hi All,

the following code for onChange used to work in AEM 6.2 but after we migrated to 6.3 , I see onChange is not getting fired, not sure what is going wrong.

@Component(immediate = true)

@Service
@Properties(value = { @Property(name = ResourceChangeListener.PATHS, value = { CommunityConstants.CONTENT_ROOT_PATH }),

   @Property(name = ResourceChangeListener.CHANGES, value = { "ADDED", "CHANGED" }, propertyPrivate = true) })

public class xyz implements ResourceChangeListener {

@Reference
private ResourceResolverFactory resourceResolverFactory;

@Reference
private ContentModelService contentModelService;

@Override
public void onChange(@Nonnull List<ResourceChange> changes) {

//some logic here

}

}

Please help me to understand it further.

Many Thanks,

Kranthi

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

joerghoh
Adobe Employee
Adobe Employee
April 23, 2019

Some basic checks first:

* Please check that the bundle containing this service is active.

* Please check that the component "xyz" is active (check on the Components list in the OSGI webconsole).

Jörg

Level 2
April 24, 2019

Hi Joerg Hoh, yes bundle & component both are active but still onChange event is not getting triggered in AEM 6.3 , but it works fine in AEM 6.2.