[opencms-dev] Getting changed module parameters without restarting

Pavel Peringer pavel.peringer at qbizm.cz
Fri May 12 10:16:49 CEST 2006


Hello

I have some module using its module parameters for working. I would like 
change the module parameters ie. files store dir. But I do not want 
restart whole web application only for this not so important change.

If I change the module parameters, the module state is frozen after 
calling org.opencms.module.CmsModule.initialize() and I allways get the 
"old" parameters until restart.

When some resource in VFS is changed, the appropriate event is fired.
Could be possible fire similar event (ie. 
EVENT_MODULE_PARAMETERS_CHANGED) in 
org.opencms.workplace.tools.modules.CmsModulesEditBase.actionCommit()?

Example (update module code part):
OpenCms.getModuleManager().updateModule(getCms(), m_module);

Map data = new HashMap();
data.put(KEY_MODULE_NAME, m_module.getName());
data.put(KEY_MODULE_PARAMETERS, m_module.getParameters());
OpenCms.fireCmsEvent(EVENT_MODULE_PARAMETERS_CHANGED, data);

Of cource add these constants to the interface.

Every action module class listening to this event then could be able to 
update parameters when the event was fired from its "parent" module.
For this purpose it must have its own Map object because the "parent" 
module is frozen and do not return new values.

Or there is other existing solution for reload changed module parameters 
without restarting webapp container (Apache/Tomcat/..) ?

Thanks for answer

Pavel Peringer

-- 
Pavel Peringer                              Qbizm technologies, a.s.
programator                                 ... the art of software.
____________________________________________________________________
www.qbizm-technologies.cz    www.qbizm.cz      www.qbizm-services.cz




More information about the opencms-dev mailing list