MACROMEDIA COLDFUSION 4.5-CFML LANGUAGE Reference page 147

Cfml language reference
Table of Contents

Advertisement

Chapter 1: ColdFusion Tags
THROWONTIMEOUT
Optional. Yes or No. Specifies how timeout conditions should be handled. If the
value is Yes an exception will be generated to provide notification of the timeout. If
the value is No execution continues past the </CFLOCK> tag. Default is Yes.
TYPE
Optional. ReadOnly or Exclusive. Specifies the type of lock: read-only or exclusive.
Default is Exclusive. A read-only lock allows more than one request to read shared
data. An exclusive lock allows only one request to read or write to shared data. See
the following Note.
Note
Usage
ColdFusion Server is a multi-threaded web application server that can process
multiple page requests at any given time. Use CFLOCK to guarantee that multiple
concurrently executing requests do not manipulate shared data structures, files, or
CFXs in an inconsistent manner. Note the following:
Using CFLOCK around CFML constructs that modify shared data ensures that
the modifications occur one after the other and not all at the same time.
Using CFLOCK around file manipulation constructs can guarantee that file
updates do not fail due to files being open for writing by other applications or
ColdFusion tags.
Using CFLOCK around CFX invocations can guarantee that CFXs that are not
implemented in a thread-safe manner can be safely invoked by ColdFusion.
This usually only applies to CFXs developed in C++ using the CFAPI. Any C++
CFX that maintains and manipulates shared (global) data structures will have to
be made thread-safe to safely work with ColdFusion. However, writing thread-
safe C++ CFXs requires advanced knowledge. A CFML custom tag wrapper can
be used around the CFX to make its invocation thread-safe.
Scope
Whenever you display, set, or update variables, in one of the shared scopes, use the
SCOPE attribute to identify the scope as Server, Application or Session.
Within the ColdFusion Administrator, the Locking page, under the Server section,
allows you to set different characteristics of the locking schema according to scope.The
Limit the scope of code that updates shared data. Exclusive locks are
required to ensure the integrity of these updates, but they have a
significant impact on performance. Read-only locks are faster. If you
have a performance-sensitive application, you should substitute read-
only locks for exclusive locks wherever it is possible, for example, when
reading shared data.
123

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the COLDFUSION 4.5-CFML LANGUAGE and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Coldfusion 4.5

Table of Contents