Status/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Bradley Wood / Bradley Wood (Bradley Wood)
Created: 10/30/2013
Components: Database
Versions: 10.0
Failure Type: Enhancement Request
Found In Build/Fixed In Build: Final / 288219
Priority/Frequency: Major / Unknown
Locale/System: English / Platforms All
Vote Count: 1
In the same manner that ColdFusion mappings can be created at the server level and overridden by a single application with code, allow for developers to specify data sources in their Application.cfc.
This would be of great use for applications such as ContentBox Modular CMS on a shared environment as the app could install itself automatically on the user's server without needing admin access. This feature currently exists in Railo Server and looks like this:
component {
this.name = "AppName";
// With JDBC URL (Other)
this.datasources.myDatasource={
class:'org.gjt.mm.mysql.Driver'
,connectionString:'jdbc:mysql://localhost:3306/demo_db?characterEncoding=UTF-8&useUnicode=true'
,username:'demouser'
,password:"encrypted:5943217a74b3d570f7ed78738da72bb4972228f46c8f9b7e96f5e995d66d1e9a"
};
// By datasource "type"
this.datasources.myOtherDatasource={
type:'MySQL'
,host:'localhost'
,port:3306
,database:'demo_db'
,username:'demouser'
,password:'demouser'
,custom:{ characterEncoding:'UTF-8' ,useUnicode:true }
};
}
More info on Railo implementation: http://blog.getrailo.com/post.cfm/railo-4-1-explicit-datasources-in-application-cfc
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3656754
External Customer Info:
External Company:
External Customer Name: bradwood.com
External Customer Email:
Attachments:
Comments: