I am currently getting ready to deploy an app built in ColdBox 2.6.x (I know… I should use 3.x, but deployment is scheduled for tomorrow).
I’ve ran into a bit of a sticky wicket with regard to datasources. The datasources are set in the coldbox.xml.cfm, and I am also using the environments.xml to handle different environments (dev, test, production). I need to use a different datasource in TEST, but can’t figure out how to do that. Nothing I do seems to work.
In looking at the Coldbox debug, it does show that the environment is indeed “test”, however, it is using the datasource defined in the coldbox.xml.cfm, rather than overriding the value as set in environments.xml.cfm.
Any ideas on what I’m missing, or is this not supported?
Not sure I understand. Are you saying I’ll need to change it in the coldbox.xml.cfm. If so, then the environments will not override this, right. And so, I would need to set this specifically for the environment? Or am I still missing the point?
The reason I’m trying to do this is because dev and test are on the same machine, but separate sites, and should use a different datasource name. The codebase uses the datasource.getName() function using a lookup on the alias, and that seemed to be a good way to go in this environment.