Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <cfif not structKeyExists(application, "dsn")>
- <cflock scope="application" type="exclusive" timeout="30">
- <cfif not structKeyExists(application, "dsn")>
- <cfset application.dsn = "MyDSN" />
- <cfset foo = "bar" />
- <cfset x = 5 />
- </cfif>
- </cflock>
- </cfif>
- <cfcomponent>
- <cfset this.name = "myApplicationName" />
- <cffunction name="onApplicationStart" returnType="boolean" output="false">
- <cfset application.dsn = "MyDSN" />
- <cfset foo = "bar" />
- <cfset x = 5 />
- <cfreturn true />
- </cffunction>
- </cfcomponent>
- <cfif not structKeyExists(application, "dsn")>
- <cflock scope="application" type="exclusive" timeout="30">
- <cfset application.dsn = "MyDSN" />
- <cfset foo = "bar" />
- <cfset x = 5 />
- </cflock>
- </cfif>
Add Comment
Please, Sign In to add comment