Should I put the following code in application.cfm
<cfif Not IsDefined("Request.DSN")>
<cfset Request.DSN ="mydsn">
</cfif>
Can you access the Request scope from inside CFC's?
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 01 October 2003 06:38
To: CF-Talk
Subject: RE: Application and Request scope
i won a free subscription to it, so price isnt an issue, lol
personally, i think there is so great stuff in there. Sowhere I think you
can do a trial run for free.
> Maybe I'm missing an inside joke. but that site just seems really
> pricey. $2.00 per article or $25.00 per month? That's more than I pay
> for ColdFusion hosting, my ISP, NetFlix, and all magazines. Even
> annually (with which you save $100) is 200 bucks a year.
>
> I don't mind paying for content but there seems to be a tremendous
> amount of free, quality content for this stuff. Is the content really
> that good?
>
> Jim Davis
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 30, 2003 9:00 PM
> To: CF-Talk
> Subject: RE: Application and Request scope
>
> good article today on locking at www.communitymx.com
> hint tony, haha! jk
>
>
>
>
>
>
>
>
>
>
>
>> If you're on CFMX locking the Session/Application/Server scopes is not
> a
>> stability issue as it was in 4.5/5.0 - but it is needed to prevent
> race
>> conditions. However if you're using them in a "read-only" manner (and
>> you're on MX) then locking isn't needed. In 4.5/5.0 locking is needed
>> to maintain server integrity.
>>
>> For your App information - that's up to you. I might suggest, at the
>> very least, using the REQUEST scope for them - that way they're
>> available to all custom tags as well.
>>
>> Broadly speaking I generally recommend for users of MX to store this
>> stuff in the Application scope: you can read the information with no
>> locking and it uses less system resources under load. For CF 4.5/5.0
> I
>>
>
> would say use the Request scope: not having to lock everything is well
>> worth the system resources used by repeating the information for each
>> request.
>>
>> Jim Davis
>>
>> -----Original Message-----
>> From: cfhelp [mailto:[EMAIL PROTECTED]
>> Sent: Tuesday, September 30, 2003 9:37 AM
>> To: CF-Talk
>> Subject: RE: Application and Request scope
>>
>> I read this and now I am questioning my Application.
>>
>>
>>
>> I have been building a document Library system. The Application is
>> shared
>> between all the sites using it by Virtual Directories.
>>
>>
>>
>> I use session variables in the login.cfm to set the User information
>> (GUID,
>> Directory, IsAdmin) after login authentication.
>>
>>
>>
>> <cfset SESSION.Auth = StructNew()>
>>
>> <cfset SESSION.Auth.Email = QryCheckLogin.Email>
>>
>> <cfset SESSION.Auth.UserGUID = QryCheckLogin.UserGUID>
>>
>> <cfset SESSION.Auth.LibraryGUID = QryCheckLogin.DocLibOwnerGUID>
>>
>> <cfset SESSION.Auth.IsLoggedIn = 'YES'>
>>
>> <cfset SESSION.Auth.Admin = '#App_Admin#'>
>>
>>
>>
>> I am not locking the above.
>>
>>
>>
>>
>>
>> Everything seems to be working when multiple users are on the site (on
>> the
>> same website or sharing). I also named the Application dynamically by
>>
>>
>>
>> <cfset AppName = #ListGetAt(CGI.HTTP_Host,'2','.')#>
>>
>> <cfapplication name="DocumentLibrary#AppName#"
>>
>> sessionmanagement="Yes"
>>
>> setclientcookies="Yes"
>>
>> sessiontimeout="#CreateTimeSpan(0,0,30,0)#"
>>
>> applicationtimeout="#CreateTimeSpan(0,0,30,0)#">
>>
>>
>>
>> Then I just use cfparam to set variables.
>>
>>
>>
>> <cfparam name="App_DataSource" default="TheDatabase">
>>
>> <cfparam name="App_DataBaseUser" default="TheUserName"><!---
>>
>> <cfparam name="App_DataBasePass" default="ThePassword">
>>
>> <cfparam name="App_Admin" default="NO">
>>
>> <cfparam name="APP_Path" default="#expandPath('../../../../')#">
>>
>> <cfparam name="APP_LibraryOwnerURL" default="#CGI.HTTP_Host#">
>>
>>
>>
>>
>>
>> Should I use Application Variables?
>>
>>
>>
>> Should I be locking them?
>>
>>
>>
>> Rick
>>
>>
>>
>> _____
>>
>> From: Jim Davis [mailto:[EMAIL PROTECTED]
>> Sent: Tuesday, September 30, 2003 7:36 AM
>> To: CF-Talk
>>
>>
>>
>> I explain this pretty thoroughly in my guide to CF variables here:
>>
>>
> http://www.depressedpress.com/DepressedPress/Content/ColdFusion/Guides/V
>>
> < http://www.depressedpress.com/DepressedPress/Content/ColdFusion/Guides/
>> V
>>
> < http://www.depressedpress.com/DepressedPress/Content/ColdFusion/Guides/
>> V%3e> >
>> ariables/Index.cfm
>>
>> I'm sure other people have other (perhaps better) opinions but that
>> should give you the skinny at least.
>>
>> Jim Davis
>>
>> -----Original Message-----
>> From: Paul Wilson [mailto:[EMAIL PROTECTED]
>> Sent: Tuesday, September 30, 2003 8:08 AM
>> To: CF-Talk
>> Subject: Application and Request scope
>>
>> I've been reading a few threads that advise on storing various things
>> (that's a technical description btw) in the
>> application or request scope. Why is this a good idea and what things
>> should be stored there?
>>
>> Thanks!
>> _____
>>
>> [Todays
>>
>> _____
>>
>> [Todays
>> _____
>>
>> [Todays
>
>
> _____
>
> [Todays
_____
[ Todays Threads
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

