Re: Cannot access session variables in a cfc

2015-01-29 Thread Scott Stewart

Some of the dangers to this approach include:  the amount of memory
allocated to the JVM. If you stuff alot of data into the Application scope,
it persists in the JVM allocated memory and it's not available to the rest
of the system/application.

You really can't change data in the Application scope without having to
reload it.

I generally use the Application scope for application wide CFC
instantiation, the and not actual application wide data.

Just my $.02

sas

On Thu, Jan 29, 2015 at 11:53 AM, John Pullam jpul...@mcleansystems.com
wrote:


 For what it's worth, the approach of storing a global data item in the
 application scope seems to be legit according to the documentation. Here's
 what it said in the CF10 doc:

 Application variables are a convenient place to store information that all
 pages of your application might need, no matter which client is running
 that application. Using application variables, an application could, for
 example, initialize itself when the first user accesses any page of that
 application. This information can then remain available indefinitely,
 thereby avoiding the overhead of repeated initialization.

 Because the data stored in application variables is available to all pages
 of an application, and remains available until a specific period of
 inactivity passes or the ColdFusion server shuts down, application
 variables are convenient for application-global, persistent data.

 However, because all clients running an application see the same set of
 application variables, these variables are not appropriate for
 client-specific or session-specific information. To target variables for
 specific clients, use client or session variables.

 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:360042
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Cannot access session variables in a cfc

2015-01-29 Thread John Pullam

For what it's worth, the approach of storing a global data item in the 
application scope seems to be legit according to the documentation. Here's what 
it said in the CF10 doc:

Application variables are a convenient place to store information that all 
pages of your application might need, no matter which client is running that 
application. Using application variables, an application could, for example, 
initialize itself when the first user accesses any page of that application. 
This information can then remain available indefinitely, thereby avoiding the 
overhead of repeated initialization.

Because the data stored in application variables is available to all pages of 
an application, and remains available until a specific period of inactivity 
passes or the ColdFusion server shuts down, application variables are 
convenient for application-global, persistent data.

However, because all clients running an application see the same set of 
application variables, these variables are not appropriate for client-specific 
or session-specific information. To target variables for specific clients, use 
client or session variables. 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:360041
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Cannot access session variables in a cfc

2015-01-29 Thread Scott Stewart

+1

On Thu, Jan 29, 2015 at 12:53 PM, Russ Michaels r...@michaels.me.uk wrote:


 I'll add for the sake of brevity, please don't put application wide cfcs in
 session scope, as a hosting provider I have seen this kill a server. 5000
 users = 5000 instances of the cfc.

 In most cases using a mapping solves the issues you have with cf not
 finding the cfc.


 On Thu, Jan 29, 2015 at 17:00 PM, Scott Stewart webmas...@sstwebworks.com
 
 wrote:


 Some of the dangers to this approach include:  the amount of memory
 allocated to the JVM. If you stuff alot of data into the Application scope,
 it persists in the JVM allocated memory and it's not available to the rest
 of the system/application.

 You really can't change data in the Application scope without having to
 reload it.

 I generally use the Application scope for application wide CFC
 instantiation, the and not actual application wide data.

 Just my $.02

 sas

 On Thu, Jan 29, 2015 at 11:53 AM, John Pullam jpul...@mcleansystems.com
 javascript:;
 wrote:

 
  For what it's worth, the approach of storing a global data item in the
  application scope seems to be legit according to the documentation.
 Here's
  what it said in the CF10 doc:
 
  Application variables are a convenient place to store information that
 all
  pages of your application might need, no matter which client is running
  that application. Using application variables, an application could, for
  example, initialize itself when the first user accesses any page of that
  application. This information can then remain available indefinitely,
  thereby avoiding the overhead of repeated initialization.
 
  Because the data stored in application variables is available to all
 pages
  of an application, and remains available until a specific period of
  inactivity passes or the ColdFusion server shuts down, application
  variables are convenient for application-global, persistent data.
 
  However, because all clients running an application see the same set of
  application variables, these variables are not appropriate for
  client-specific or session-specific information. To target variables for
  specific clients, use client or session variables.
 
 



 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:360044
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Cannot access session variables in a cfc

2015-01-29 Thread Russ Michaels

I'll add for the sake of brevity, please don't put application wide cfcs in
session scope, as a hosting provider I have seen this kill a server. 5000
users = 5000 instances of the cfc.

In most cases using a mapping solves the issues you have with cf not
finding the cfc.


On Thu, Jan 29, 2015 at 17:00 PM, Scott Stewart webmas...@sstwebworks.com
wrote:


Some of the dangers to this approach include:  the amount of memory
allocated to the JVM. If you stuff alot of data into the Application scope,
it persists in the JVM allocated memory and it's not available to the rest
of the system/application.

You really can't change data in the Application scope without having to
reload it.

I generally use the Application scope for application wide CFC
instantiation, the and not actual application wide data.

Just my $.02

sas

On Thu, Jan 29, 2015 at 11:53 AM, John Pullam jpul...@mcleansystems.com
javascript:;
wrote:


 For what it's worth, the approach of storing a global data item in the
 application scope seems to be legit according to the documentation. Here's
 what it said in the CF10 doc:

 Application variables are a convenient place to store information that all
 pages of your application might need, no matter which client is running
 that application. Using application variables, an application could, for
 example, initialize itself when the first user accesses any page of that
 application. This information can then remain available indefinitely,
 thereby avoiding the overhead of repeated initialization.

 Because the data stored in application variables is available to all pages
 of an application, and remains available until a specific period of
 inactivity passes or the ColdFusion server shuts down, application
 variables are convenient for application-global, persistent data.

 However, because all clients running an application see the same set of
 application variables, these variables are not appropriate for
 client-specific or session-specific information. To target variables for
 specific clients, use client or session variables.





~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:360043
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm