Seth, While I'm not incredibly familiar with ModelGlue, I'll try to answer.
Am I correct in assuming that you have a MG app that you want multiple "instances" of (meaning although it's the same codebase you are going to run a separate MG app for each domain). The reason I'm assuming this is that you wouldn't be able to have one single instance of the app but at the same time multiple "simpleConfig" beans (how would the other beans know which one to use?). So, assuming that, I think what you are asking is how do I separately add beans to the ColdSpring beanFactory? This is actually rather easy... you need only use one of the loadBeans() method on the BeanFactory itself (MG'ers on the list - you can "get at" the BeanFactory, correct?). So basically when the app starts up, you would find your domain-specific simpleConfig definition and add it to the beanFactory (ColdSpring won't resolve dependencies until it is asked for a bean - so the dependency injection features should work). Does that help? Chris may be able to clarify as he has more MG experience. -Dave On 1/24/06, Seth MacPherson <[EMAIL PROTECTED]> wrote: > Hello all, > > I'm getting started with ColdSpring and enjoying all that it has to > offer. I have a bit of a problem - perhaps without a simple answer. > > I have a Model-Glue application that's using ColdSpring and I want to > load/create a bean that is not specified in the AllBeans.xml file. > > <!--- Taken From ModelGlue.xml ---> > <setting name="beanFactoryLoader" > value="ModelGlue.Core.ColdSpringLoader" /> > <setting name="beanMappings" value="/config/beans/AllBeans.xml" /> > > > The site I'm building is going to be shared across multiple domains. I > would like to load domain specific settings as a singleton bean and > passed around under a common name - appSettings. Is that possible? > > <!--- Bean I'm attempting to load dynamically from dynamic folder name > ---> > <?xml version="1.0" encoding="utf-8"?> > <bean id="simpleConfig" class="ModelGlue.Bean.CommonBeans.SimpleConfig"> > <property name="profile"> > <struct> > <entry key="SkinName"> > <value>default</value> > </entry> > <entry key="ThemeColor"> > <value>red</value> > </entry> > <entry key="IconColor"> > <value>red</value> > </entry> > <entry key="SiteTitle"> > <value>mys site name</value> > </entry> > <entry key="DomainName"> > <value>mysite.com</value> > </entry> > <entry key="Mode"> > <value>Dev</value> > </entry> > <entry key="Version"> > <value>0.02</value> > </entry> > <entry key="DefaultLanguage"> > <value>English</value> > </entry> > <entry key="isDebugMode"> > <value>false</value> > </entry> > <entry key="DefaultEvent"> > <value>home.start</value> > </entry> > <entry key="ViewMappings"> > <value>/views</value> > </entry> > </struct> > </property> > </bean> > > > Thanks in advance for any feedback. > > - Seth MacPherson > >
