I have a question with respect to Liferay Startup Events.
In Liferay documentation it is given:
Startup Events
Input a list of comma delimited class names that extend
com.liferay.portal.struts.SimpleAction
. These classes will run at the specified event.
Could anybody please tell me what is the difference between global.startup.events
and application.startup.events
and could any body tell me in what case do we need to override them?
And should both these start up events extend com.liferay.portal.struts.SimpleAction
?? and I couldn't find anything inside the SimpleAction
except this:
public abstract class SimpleAction {
public abstract void run(String[] ids) throws ActionException;
}
}
I also wanted to know this class contains nothing, how does Liferay knows what XML files to read and process?
Thanks
global.startup.events
- run once for global serverapplication.startup.events
- run for every portal instance at startup. If you have one portal instance at your server (normal case) - here is no difference between this properties. I useapplication.startup.events
.Extend the
com.liferay.portal.kernel.events.SimpleAction
class and implimentrun
-methode, that will call by liferay startup. For this purpose create a hook plugin and register in liferay-hook.xml the property file, e.g.:Create
portal-myext.properties
in classpath and set your startup action:The action
MyStartupAction
must be in the same classpath, hence same hook-plugin.