Status/Resolution/Reason: To Fix//
Reporter/Name(from Bugbase): David McGuigan / David McGuigan (David McGuigan)
Created: 04/02/2012
Components: Language
Versions: 10.0
Failure Type: Enhancement Request
Found In Build/Fixed In Build: Public Beta /
Priority/Frequency: Trivial / Unknown
Locale/System: English / Win All
Vote Count: 2
It seems extremely counter-performant to me that we author application-level settings in the pseudo constructor in application.cfc instead of in onApplicationStart. For code that needs to react to the hard drive letter or evaluate other dynamic conditions, that means that your settings code has to run once for every request in your app, instead of just once at the startup of the app.
Can we please add the ability to put those settings on onApplicationStart? It would be nice to be able to do all of them there including the application name, but I imagine that might be the one that’d still need to live in the pseudo constructor, which I could live with.
From a discussion in the thread:
Ray Camden said: "I agree with this. A great example is custom logic to get paths to
important directories based on code that checks if the current
environment is development versus staging versus production.
What’s nice is that this could be backwards compatible. Consider this.mappings.
If you set it in onApplicationStart and do NOT set it in the
pseudo-constructor, then it should just work as is.
If you set it in the pseudo-constructor, it works as is.
If you set it in both, a dumb mistake, then the 'normal' CF mechanism
works and the pseudo-constructor one takes precedence."
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3155857
External Customer Info:
External Company:
External Customer Name: David Michael McGuigan
External Customer Email:
Attachments:
Comments: