RE: [coldbox:17856] Re: [coldbox 3.5.3] Referencing datasource bean in wirebox config.cfc

When you use WireBox inside of ColdBox, all the ColdBox settings are passed into the binder config as properties. You can deal with them using the following methods:

  • getProperty(name,[default]) : Get a specific property
  • getProperties() : Get all the properties structure
  • propertyExists(name) : Check if a property exists
  • setProperty(name,value) : Dynamically add properties to the structure

The docs for that are here:

So, your case you’d want to do something like this: getProperty(“datasources”).nameOfDataSource



ColdBox Platform Evangelist
Ortus Solutions, Corp

ColdBox Platform:

Hey Brad,

Just noticed for some reason your initial replies to the threads are creating a new thread, is that deliberate?