[opencms-dev] Is there a way to add a new site server without a restart?

Mario Jäger m.jaeger at alkacon.com
Fri Mar 19 09:48:41 CET 2010


Hi Olaitan,

It is always necessary to restart the servlet container after you changed the OpenCms 
configuration files. You can not use the method OpenCms.getSiteManager().addSite() to 
add a site after the OpenCms configuration is finished, because the description of 
this method says the following: "Adds a new CmsSite to the list of configured sites, 
this is only allowed during configuration. If this method is called after the 
configuration is finished, a RuntimeException is thrown."

But I can not imagine, that you add many sites each day or week. That is why I can not 
imagine that you really need a workaround for this. Or how often do you want to add 
new sites?

-- 
Kind Regards,
Mario.
 
-------------------
Mario Jäger
 
Alkacon Software GmbH  - The OpenCms Experts                    
http://www.alkacon.com - http://www.opencms.org


Olaitan Olamilehin schrieb:
> Hi all,
>
> Currently, a restart is needed each time a new site is added to the
> opecms-system.xml config file. I tried to do this programmatically using
> this method OpenCms.getSiteManager().addSite() but I got a
> CmsConfigurationException stating "Site configuration has been frozen
> and can no longer be changed".
>
> Is there any workaround for this? Any help will be highly appreciated.
>
>   



More information about the opencms-dev mailing list