Expand my Community achievements bar.

SOLVED

Problema con los EventHandlers

Avatar

Level 1

Buenas,

 

Nuestra proyecto esta basado en Adobe AEM 6.5 on premise. 

Tenemos varias clases que implementan la interfaz EventHandler, con la idea de que, cuando se publique una página, se ejecute en una o varias de esas clases (las que implementan la interfaz) para enviar correos, o enviar información a otro sistema cuando se publique la página.

El problema que tenemos ahora es que sólo se dispara uno de esos eventos y no todos los que tenemos implementados.

Entonces, ¿es posible que teniendo varias clases que implementan la interfaz EventHandler, sólo se ejecute una de esas clases y no el resto? ¿Existe alguna limitación en la implementación del EventHandler?

 

Gracias de antemano, 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Translation from Spanish to English

Hello,

 

Our project is based on Adobe AEM 6.5 on premise.

We have several classes that implement the EventHandler interface, with the idea that, when a page is published, it is executed in one or more of those classes (the ones that implement the interface) to send emails, or send information to another system when the page is published.

The problem we have now is that only one of those events is fired and not all the ones we have implemented.

So, is it possible that having several classes that implement the EventHandler interface, only one of those classes is executed and not the rest? Is there any limitation in the EventHandler implementation?

 

Thanks in advance,



Arun Patidar

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

Translation from Spanish to English

Hello,

 

Our project is based on Adobe AEM 6.5 on premise.

We have several classes that implement the EventHandler interface, with the idea that, when a page is published, it is executed in one or more of those classes (the ones that implement the interface) to send emails, or send information to another system when the page is published.

The problem we have now is that only one of those events is fired and not all the ones we have implemented.

So, is it possible that having several classes that implement the EventHandler interface, only one of those classes is executed and not the rest? Is there any limitation in the EventHandler implementation?

 

Thanks in advance,



Arun Patidar

Avatar

Community Advisor

You can have multiple event Listener on same event.

Example : https://aemhints.com/2020/11/08/event-listener-in-aem-6-5/ 



Arun Patidar