Using Persistent Data And Locking - Adobe 38043740 - ColdFusion Standard - Mac Development Manual

Developing applications
Hide thumbs Also See for 38043740 - ColdFusion Standard - Mac:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Developing CFML Applications
Testing the code
To test the various ways errors can occur and be handled in this example, try the following:
• In the calling page, change the attribute name to any other value; for example, My Attrib. Then change it back.
• In the first
tag, change the data source name to an invalid data source; for example, NoDatabase.
cfquery
• With an invalid first data source name, change the data source in the second
• Insert
tags throwing custom exculpations in various places in the code and observe the effects.
cfthrow

Using Persistent Data and Locking

Adobe ColdFusion provides several variable scopes in which data persists past the life of a single request. These are the
Client, Application, Session, and Server scopes. These scopes let you save data over time and share data between pages
and even applications. Use these scopes as persistent scopes. In particular, use the Client and Session scopes to
maintain information about a user across multiple requests.
ColdFusion lets you lock access to sections of code to ensure that ColdFusion does not attempt to run the code, or
access the data that it uses, simultaneously or in an unpredictable order. This locking feature is important for ensuring
the consistency of all shared data, including data in external sources in addition to data in persistent scopes.
You can use persistent scopes to develop an application and use locking to ensure data consistency.
About persistent scope variables
ColdFusion provides four variable scopes, described in the following table, that let you maintain data that must be
available to multiple applications or users or must last beyond the scope of the current request.
Last updated 1/20/2012
tag to cfdocexamples.
cfquery
301

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents