Hi Jim
I’ll offer a few pointers.
ColdBox offers tier-control already in your ColdBox.cfc configuration file. Here you can tell ColdBox which environments you will have an you can assign an alias to each environment. Then you can create methods that match these aliases so you can define further or remove further options on a per-ennvrionemnt basis:
function development(){
// no passwords or caching
coldbox.handlerCaching = false;
coldbox.reinitPassword = “”;
datasources.jim = { … }
}
We also have the concept of defining datasource metadata that WireBox can help you inject in your objects like:
property name=“dsn” inject=“coldbox:datasource:mydsn”
That’s 1 approach.
If you want to convert your CS to WireBox, we have an app for that Our ColdBox Platform Utilities can auto-convert your cold spring xml to wirebox cfc.
Something like you post would translate to something like:
map( “prodDSN” ).toFactoryMethod( factory=“EnvironmentService”, method=“getProductionDSn” );
map(“UserManager”).to(“common.ourdomain.security.UserManager”)
.initArg(name=“productionDSN”,ref=“prodDSN")
.initArg(name=“PaymentService”,ref=“PaymentService”)
.asSingleton();
Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com
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