<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body text="#000000" bgcolor="#ffffff">
Hi Mario,<br>
<br>
Thanks for your reply. Yeah, later I found the description that the
method can only be called at startup during system configuration.<br>
<br>
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 "<b>Re-initialize workplace</b>"
admin tool to reload the workplace configuration. <br>
<br>
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.<br>
<br>
Thanks once again for you reply.<br>
<br>
Regards,<br>
Olaitan.<br>
<br>
<br>
-------- Original Message --------
<table class="moz-email-headers-table" border="0" cellpadding="0"
cellspacing="0">
<tbody>
<tr>
<th nowrap="nowrap" valign="BASELINE" align="RIGHT">Subject: </th>
<td>Re: [opencms-dev] Is there a way to add a new site server
without a restart?</td>
</tr>
<tr>
<th nowrap="nowrap" valign="BASELINE" align="RIGHT">Date: </th>
<td>Fri, 19 Mar 2010 09:48:41 +0100</td>
</tr>
<tr>
<th nowrap="nowrap" valign="BASELINE" align="RIGHT">From: </th>
<td>Mario Jäger <a class="moz-txt-link-rfc2396E" href="mailto:m.jaeger@alkacon.com"><m.jaeger@alkacon.com></a></td>
</tr>
<tr>
<th nowrap="nowrap" valign="BASELINE" align="RIGHT">To: </th>
<td><a class="moz-txt-link-abbreviated" href="mailto:olaitan.olamilehin@moremr.com">olaitan.olamilehin@moremr.com</a>, The OpenCms mailing list
<a class="moz-txt-link-rfc2396E" href="mailto:opencms-dev@opencms.org"><opencms-dev@opencms.org></a></td>
</tr>
</tbody>
</table>
<br>
<br>
<pre>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
<a class="moz-txt-link-freetext" href="http://www.alkacon.com">http://www.alkacon.com</a> - <a class="moz-txt-link-freetext" href="http://www.opencms.org">http://www.opencms.org</a>
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.
>
>
</pre>
</body>
</html>