Foros de discusión

spring hook

thumbnail
Pilar Hidalgo, modificado hace 11 años.

spring hook

New Member Mensajes: 14 Fecha de incorporación: 10/04/12 Mensajes recientes
Hi all,

I have a portlet that I need that it has information when system loads. I have thought a solution with spring. The doubt is if can be done to a hook by spring to do this initial load . I understand that this code is foreign to the portlet. thanks for your help!!
Ketan Patel, modificado hace 11 años.

RE: spring hook

Junior Member Mensajes: 72 Fecha de incorporación: 4/05/12 Mensajes recientes
Hi Pilar Hidalgo,

Can you please explain your question in details? I am not getting what you want with spring hook.

Thanks,
Ketan Patel
thumbnail
Hitoshi Ozawa, modificado hace 11 años.

RE: spring hook

Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientes
Following page in Liferay's document may be of some help. Maybe you can just add your event to the startup event list.

http://www.liferay.com/documentation/liferay-portal/6.1/user-guide/-/ai/startup-events
thumbnail
Sagar A Vyas, modificado hace 11 años.

RE: spring hook

Liferay Master Mensajes: 679 Fecha de incorporación: 17/04/09 Mensajes recientes
Pilar Hidalgo:
Hi all,

I have a portlet that I need that it has information when system loads. I have thought a solution with spring. The doubt is if can be done to a hook by spring to do this initial load . I understand that this code is foreign to the portlet. thanks for your help!!


Hi Pillar,

You can achieve this kind of requirement by hook.

Hook is provide such facilities to override the event,you can override following events
1. Application startup event - If you want to execute certain code before server gets started.
2. Login Event (Pre/Post)
3. Service Event (Pre /Post)

I guess you need to create hook by overriding by application startup event.

Note : You will not have fully access of certain variable at that time,so be conscious for that. HOOKs

Thanks,
Sagar Vyas