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

Olaitan Olamilehin olaitan.olamilehin at moremr.com
Fri Mar 19 10:15:09 CET 2010

Hi Mario,

Thanks for your reply. Yeah, later I found the description that the 
method can only be called at startup during system configuration.

Initially, I was just curious to see if it was possible to do the same 
thing that is done when a new module is added, updated or deleted from 
the GUI because in these cases, the opencms-module.xml file is modified 
accordingly and the CmsModuleManager reloads the module configuration. A 
similar idea is also used in the "*Re-initialize workplace*" admin tool 
to reload the workplace configuration.

Well, I still think it would be a good idea to have an interface in 
future to add new sites without having to restart the servlet 
container.  For example, in our case we might add multiple site 
configurations in a day and having a restart each time will disrupt 
other services that are running on the server.

Thanks once again for you reply.


-------- Original Message --------
Subject: 	Re: [opencms-dev] Is there a way to add a new site server 
without a restart?
Date: 	Fri, 19 Mar 2010 09:48:41 +0100
From: 	Mario Jäger <m.jaeger at alkacon.com>
To: 	olaitan.olamilehin at moremr.com, The OpenCms mailing list 
<opencms-dev at opencms.org>

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 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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20100319/e310fa55/attachment.htm>

More information about the opencms-dev mailing list