Outside of the Ray has mentioned I would take a look at the following page
"Configuring and enabling application variables".
http://livedocs.adobe.com/coldfusion/6/Developing_ColdFusion_MX_Applications_with_CFML/sharedVars6.htm#1185482

Just note that the component will be removed from the cache after 18 hours
of INACTIVE activity. Not sure if that's an issue here though.

-Pat
http://patweb99.avatu.com

On Mon, Feb 2, 2009 at 11:03 AM, Kevin Lemke <[email protected]> wrote:

>
> I have an application that is using an application.cfc with the following
> code at its top:
>
> <cfcomponent>
> <CFSET This.name = "XR">
> <CFSET This.SESSIONMANAGEMENT = "true">
> <CFSET This.CLIENTMANAGEMENT = "true">
> <CFSET This.CLIENTSTORAGE = "cookie">
> <CFSET This.LOGINSTORAGE = "session">
> <CFSET This.APPLICATIONTIMEOUT = "#CreateTimeSpan(0,18,0,0)#">
> <CFSET This.SESSIONTIMEOUT = "#CreateTimeSpan(0,0,20,0)#">
> <cfset THIS.mappings["/MyMap"]="D:\inetpub\wwwroot\xr">
> <!--- See if the application component needs to be created --->
> <CFIF NOT IsDefined("application.xr")>
>  <!--- Create the component --->
>  <CFOBJECT name="xr" component="xr">
>  <CFSET application.xr = xr>
> </CFIF>
>
> ........
>
> I then invoke the component within my web pages as follows:
>
> <CFINVOKE component="#application.xr#" method="imageXML"
> returnvariable="listingsstr" imagepath="#coffeepath#" imageURL="../coffee">
>
> and everything works fine.
>
> However, I was under the assumption that the component would be created and
> persist for 18 hours, as specified in my
>
> <CFSET This.APPLICATIONTIMEOUT = "#CreateTimeSpan(0,18,0,0)#">
>
> But, it is executing the code inside
>
> <CFIF NOT IsDefined("application.xr")> .... </CFIF>
>
> each time the application.cfc is run.
>
> Am I doing something wrong or do I not understand how this should work?  I
> thought it would make sense to only instansiate the compnent once every 18
> hours and let everybody invoke it.  Instead I get it instansiated only for
> the one webpage and a new one is instansiated again, even for the same user
> a few seconds later.
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318757
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to