[opencms-dev] Issue with I_CmsEventListener in Clustered System

Daniel Seidel d.seidel at alkacon.com
Thu Feb 8 08:51:38 CET 2024


Hi,

not all the default OpenCms events are forwarded to the non-workplace 
servers, since it does not make sense to forward events that only 
indicate offline changes and no online change.

If you set up your own events, you can configure them to be forwarded to 
a server in the ocee-cluster.xml:

...

             <server>
                 <name>The server that should receive the event</name>
                 ...
                 <custom-events>{comma-separated list of 
event-ids}</custom-events>
             </server>


E.g., if your event has id 20001 and only this custom event should be 
received, you put <custom-events>20001</custom-events>


Best, Daniel.

Am 06.02.24 um 17:35 schrieb Chema Jiménez via opencms-dev:
>
> Hi,
>
> In my environment, I have "OCEE" configured and the I_CmsEventListener 
> event is not executed on the slaves.
>
> Do I have to indicate any specific configuration?
>
> Best regards.
>
> Chema Jiménez Flores.
>
> *De:*DAVID RODRIGUEZ MERINO <david.rodriguez.merino at uva.es>
> *Enviado el:* martes, 06 de febrero de 2024 9:05
> *Para:* Chema Jiménez <chema.jimenez at sagasoluciones.com>; 
> opencms-dev at opencms.org
> *Asunto:* Re: Issue with I_CmsEventListener in Clustered System
>
> You can  call a JSP/java to send an event from master to slaves.
>
> Another option is pay the OCEE to Alkacon
>
> -- 
>
>
> David Rodríguez Merino
> Área Web del Gabinete de Comunicación
> Vicerrectorado de Comunicación
> Universidad de Valladolid
>
> Edificio Rector Tejerina
> Plaza de Santa Cruz nº 6
> 47002 Valladolid
>
> Email: david.rodriguez.merino at uva.es
> Email grupo: soporte-web at uva.es
>
> *De: *Chema Jiménez <chema.jimenez at sagasoluciones.com>
> *Fecha: *lunes, 5 de febrero de 2024, 8:47
> *Para: *DAVID RODRIGUEZ MERINO <david.rodriguez.merino at uva.es>, 
> opencms-dev at opencms.org <opencms-dev at opencms.org>
> *Asunto: *RE: Issue with I_CmsEventListener in Clustered System
>
> Hello David,
>
> Thank you for your response. That is an option, but what I really need 
> to know is how I can send events to the slaves using the OpenCms API.
>
> Best regards.
>
> Chema Jiménez Flores.
>
> *De:*DAVID RODRIGUEZ MERINO <david.rodriguez.merino at uva.es>
> *Enviado el:* lunes, 05 de febrero de 2024 8:12
> *Para:* opencms-dev at opencms.org
> *CC:* Chema Jiménez <chema.jimenez at sagasoluciones.com>
> *Asunto:* RE: Issue with I_CmsEventListener in Clustered System
>
> Hi Chema
>
> We use a table in database to save the changes in the master. The 
> slaves read this table and do the changes in a task every 5 minutes. 
> If you need more information contact me
>
> Regards
>
> ------------------------------------------------------------------------
>
> *De:*opencms-dev <opencms-dev-bounces at opencms.org> en nombre de Chema 
> Jiménez via opencms-dev <opencms-dev at opencms.org>
> *Enviado:* jueves, 1 de febrero de 2024 8:46
> *Para:* opencms-dev at opencms.org <opencms-dev at opencms.org>
> *Cc:* Chema Jiménez <chema.jimenez at sagasoluciones.com>
> *Asunto:* [opencms-dev] Issue with I_CmsEventListener in Clustered System
>
> Hello,
>
> I have developed a class that implements I_CmsEventListener, and its 
> events include [EVENT_RESOURCE_AND_PROPERTIES_MODIFIED, 
> EVENT_RESOURCE_COPIED, EVENT_RESOURCE_CREATED, EVENT_RESOURCE_DELETED, 
> EVENT_RESOURCE_MODIFIED, EVENT_RESOURCE_MOVED]. If a resource meets a 
> certain condition, another class is executed.
>
> The problem is that in a "cluster" system (with two slave nodes), when 
> editing a resource on the admin node, the I_CmsEventListener class 
> runs only on the admin node and not on the other nodes.
>
> How can I ensure that the I_CmsEventListener class executes on all 
> nodes when modifying a resource?
>
> Thank you very much.
>
> Regards.
>
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> https://lists.opencms.org/mailman/listinfo/opencms-dev
>
>
>
-- 
Kind Regards

Daniel.

-------------------

Daniel Seidel
Alkacon Software GmbH & Co. KG - The OpenCms Experts
https://www.alkacon.com  -http://www.opencms.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opencms.org/pipermail/opencms-dev/attachments/20240208/60b47524/attachment.htm>


More information about the opencms-dev mailing list