[opencms-dev] Missing element that calls a customizedEventListener
Alexander Kandzior
alex at opencms.org
Thu Mar 24 18:37:12 CET 2005
> > I couldn't find a way to add listeners on startup, too.
> > At least it was possible with OpenCms 5.0.
>
> Small oversight on our part, this will be added ASAP.
I thought about the issue and actually I think this function is not longer
required.
In case you want to init a class on system startup, this should be
implemented as a module with a module action class. The module action class
is in the <class> node of the module manifest.xml (currently you need to
edit this by hand).
To add a module action class you need to implememt
org.opencms.module.I_CmsModuleAction or (for more convenience) extend the
abstract class org.opencms.module.A_CmsModuleAction.
The interface has a method
void initialize(CmsObject adminCms, CmsConfigurationManager
configurationManager, CmsModule module);
That will be called when OpenCms has started. There you can register all
your event listers.
I don't find any use in adding another node to the system configuration for
startup class generation when this function is there already. If there's a
use case I have overlooked that can't be handled with the I_CmsModuleAction
but can with another system "startupclass" configuration please let me know.
Best Regards,
Alex.
Alexander Kandzior
Alkacon Software - The OpenCms Experts
http://www.alkacon.com
More information about the opencms-dev
mailing list