When is it appropriate to place DSN definitions inside the onApplicationStart() function vs outside of the function?
I have seen this method:
<cfset this.datasource = "datasource_name">
<cffunction name="onApplicationStart" returnType="boolean" output="false">
and I've seen it this way...
<cffunction name="onApplicationStart" returnType="boolean" output="false">
<cfset application.dsn = "datasource_name">
The only reasons I can find for this format is leaving the datasource outside the function is an older, still supported, but outdated way of doing things.
Is there any other reason for it?
I did find this question already, but it only states where DSNs should be declared, but not when to it should go inside vs outside.