Status/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Aaron Neff / Aaron Neff (Aaron Neff)
Created: 01/06/2015
Components: Database
Versions: 11.0
Failure Type:
Found In Build/Fixed In Build: CF11_Final /
Priority/Frequency: Normal / Some users will encounter
Locale/System: ALL / Platforms All
Vote Count: 2
Changes to THIS.datasources are ignored until CF restart
Repro:
Application.cfc
---------------
component {
THIS.name = "myApp";
THIS.datasources.myDSN = {driver="MSSQLServer", database="mydatabase", host="www.domain.com", port=1433, username="username", password="password"};
THIS.datasource = "myDSN";
}
index.cfm
---------
<cfquery name="q">
SELECT TOP 1 * FROM mytable
</cfquery>
<cfdump var="#q#">
1) Run the above code and see cfdump returns correct result
2) In Application.cfc's THIS.datasources and THIS.datasource, change "myDSN" to "myDSN2"
3) Run the above code and see exception: "Datasource myDSN2 could not be found." (bug)
4) In index.cfm, run applicationStop()
5) Run the above code and see exception: "Datasource myDSN2 could not be found." (bug)
6) Restart CF
7) Run the above code and see cfdump returns correct result
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3916906
External Customer Info:
External Company:
External Customer Name: itisdesign
External Customer Email:
External Test Config: Verified w/ CF11 Final and CF11 Update 3 (11,0,03,292480) on x64 Windows 8.1 Pro
Attachments:
Comments: