Foros de discusión

Hooks execution sequence

Irene Lee, modificado hace 10 años.

Hooks execution sequence

New Member Mensaje: 1 Fecha de incorporación: 14/05/13 Mensajes recientes
Hi,

I am trying to implement 2 hooks to be executed in a specific sequence for a single login post event. May I know how can this be done? Where should the login.events.post property be set, in the portal-ext.properties at application server level? I tried setting it here but an error thrown stating ClassNotFound for both hooks.

Due to the design of the system, we must have 2 separate hooks deployed as a war.

Thanks,
Irene
thumbnail
Zsolt Balogh, modificado hace 10 años.

RE: Hooks execution sequence

Expert Mensajes: 463 Fecha de incorporación: 23/03/09 Mensajes recientes
Hi Irene,

The deployment order of the hooks cannot be determined as it mostly depends on the application server deployment order. You can make some tricks with the plugin dependencies, however it won't guarantee anything.

If you want to add an action from your hook, it needs to be configured from your hook in order to have Liferay understand which classloader to use. You have to use your own properties file which needs to be added to the liferay-hook.xml file. You can find the exact steps here.

Zsolt