<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2963" name=GENERATOR></HEAD>
<BODY text=#000000 bgColor=#ffffff>
<DIV dir=ltr align=left><SPAN class=926085912-16092006><FONT face=Arial
color=#0000ff size=2><SPAN class=926085912-16092006><FONT face=Arial
color=#0000ff size=2>Do you really need to do this during runtime?
</FONT></SPAN>As I said the other day, the normal way to add a site is to edit
opencms-system.xml (using your favourite text editor) to include the new
site(s). The changes will then be picked up when OpenCms is next
started.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=926085912-16092006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=926085912-16092006><FONT face=Arial
color=#0000ff size=2>Jon</FONT></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> opencms-dev-bounces@opencms.org
[mailto:opencms-dev-bounces@opencms.org] <B>On Behalf Of </B>Christian
Steinert<BR><B>Sent:</B> 16 September 2006 12:16<BR><B>To:</B> The OpenCms
mailing list<BR><B>Subject:</B> Re: [opencms-dev] change opencms-system.xml with
java code/site node<BR></FONT><BR></DIV>
<DIV></DIV>Andy Bicksbo schrieb:
<BLOCKQUOTE cite=midc67d43dd0609160356rf3c6c7er3197654d396e7d5c@mail.gmail.com
type="cite">
<META http-equiv=Context-Type content="text/html; charset=ISO-8859-1">
<DIV>Hi all!</DIV>
<DIV>I asked the same question afew days ago, but I didn't get s satisfying
answer since that nor i found a solution by myself. </DIV>
<DIV>So desparating pulling hair since that on my proplem:</DIV>
<DIV>I am trying to add some custom site definitions to the opencms-system.xml
through a java class with the method:</DIV>
<DIV>addSite() from the Class org.opencms.site.CmsSiteManager</DIV>
<DIV> </DIV>
<DIV> i get the following error message:</DIV>
<DIV> </DIV>
<DIV> org.opencms.main.CmsRuntimeException: Site configuration has been
frozen and can not longer be changed.<BR> at
org.opencms.site.CmsSiteManager.addSite(CmsSiteManager.java:289)</DIV>
<DIV> </DIV>
<DIV>In javadoc its written: "Adds a new CmsSite to the list of configured
sites, this is only allowed during configuration"</DIV>
<DIV>Does anybody know how to get "during configuration"?</DIV>
<DIV>-or know a different solution</DIV>
<DIV>Best regards<BR>Andy</DIV></BLOCKQUOTE>This is just an assumption, but this
method might just be there to inject the config information into the Site
Manager, when opencms is booted.<BR>If that is the case, then this method just
initializes the state of the Site Manager and is not meant for adding
sites.<BR><BR>But this is just a guess. The only way to find out is by checking
how the Site Manager gets frozen. But with other classes I have seen, that they
are usually created, initialized with runtime data and then frozen. If that's
the case here, then you only way of changing the configuration might be by
injecting sth into the XML config and somehow triggering a restart of your web
app. The latter is probably not possible with any of the opencms
apis<BR><BR>christian<BR></BODY></HTML>