Fórumok

spring hook

thumbnail
Pilar Hidalgo, módosítva 11 év-val korábban

spring hook

New Member Bejegyzések: 14 Csatlakozás dátuma: 2012.04.10. Legújabb bejegyzések
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, módosítva 11 év-val korábban

RE: spring hook

Junior Member Bejegyzések: 72 Csatlakozás dátuma: 2012.05.04. Legújabb bejegyzések
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, módosítva 11 év-val korábban

RE: spring hook

Liferay Legend Bejegyzések: 7942 Csatlakozás dátuma: 2010.03.24. Legújabb bejegyzések
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, módosítva 11 év-val korábban

RE: spring hook

Liferay Master Bejegyzések: 679 Csatlakozás dátuma: 2009.04.17. Legújabb bejegyzések
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