> I just read through the allaire article on locking shared scope variables
> http://www.allaire.com/handlers/index.cfm?ID=17318 and I noticed that
there
> are a lot of pitfalls involved in using them. The one place that I thought
> developers should use them is in naming the datasource. However, the
article
> claims that the request scope should be used as a datasource variable.
>
Actually Neil what is says is don't put a CFLOCK around the whole of a
query, set a temporary variable from your application variable and use that
in your query for the datasource name.
This is to prevent your application variable being locked for too long while
the query is processed, which could potentially create timeouts for other
users.
> What are the benefits to using shared scope variables? and what types of
> variables should be set using that scope?
>
The biggest benefit is that you set all your global variables in one place.
If, for instance, you need to change the datasource name, you change the one
<Cfset> and all your queries are using the new datasource.
Things you could set as application variables......
Base URLs, File paths, datasource types, datasource name....
Anything really that is used repeatedly through out your application and if
you need to change one, you'll need to change all of them....
Hope that makes some sense.
Regards
Stephen
------------------------------------------------------------------------------
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.