CB 2.6 Environments and Datasources

Hi,

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?

Kevin S. Anderson

Superlative Solutions, Inc.

You cannot override it fromthe environments using the datasource element.

You will need to do a and go to the exact setting to override:

Luis F. Majano
President
Ortus Solutions, Corp

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Thanks, Luis:

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? :wink:

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.

Thanks again, and in advance, of your reply.

Be blessed!

Kevin