Includes Coldbox Config?

am I missing something wetoddid? Is there no way I can define a
generic block of coldbox.xml config to <include> into more then one

Unfortunately this seems to be the case. However, I am working on adding that to future releases. :slight_smile:

I've been so busy elsewhere that the need just started catching up to me
as my CB app count rises.

Matt Quackenbush wrote:

What are you trying to do?

Luis, I know that ColdBox and co gives me more ways then one to skin a
cat.. I'm also confident that what ever that Quackman comes up with will
be slick!
However, Since there are a few options I could explore besides
coldbox.xml includes that will do what I looking to do, I would
appreciate hearing your suggestions on this if you have any....

I have a few related applications per server which share /mybadassmodel
and load a custom factory from it into the application scope to do
work... I currently configure this factory per application with a bunch
of <yoursettings>, some of these are the same with every application,
some of these settings are application/version/client specific... I just
want to include the default settings for this factory from a
/mybadassmodel/config/coldbox.xml , like I can import the beans for the
factory and it's dependencies from /mybadassmodel/config/colspring.xml..
since having these specific settings remain in the coldbox.xml keeps
what I felt were important aspects of my applications configuration, via
this factory, centralized with the coldbox app config stuff.

I was just surprised to find that this functionality wasn't supported
out of the coldbox like it is in current transfer and coldspring


Luis Majano wrote:

Hi ,

Actually it is supported in a programmatic fashion. The next version of coldbox will allow for programmatic configuration, and removing the xml file (optional).

However, if you need to share settings across applications, you can easily load them in an application start handler.

Pseudo Code-

//get settings from a central location, gives me back a structure of settings, whether
//From a file or db orwhatever
settings = getSettingsFromFile()
for(setting in settings){
setSetting(name=setting, value=settings[setting];

That’s it. I do this in most of my apps. I save my settings in the DB as options. Then I create that simple script in the application start handler (or can be abstracted to an interceptor). I even have a db panel that helps me change/add/update settings and even reload them dynamically.