O'Reilly logo

Adobe ColdFusion 8 Web Application Construction Kit, Volume 1: Getting Started by Charlie Arehart, Raymond Camden, Ben Forta

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using Exclusive Locks

As Table 19.5 shows, there are two types of locks: Exclusive and ReadOnly. Let’s start off simple, and talk about <cflock> tags of type="Exclusive". If you want, you can solve your race condition problems using only Exclusive locks.

Exclusive locks work like this. When your template gets to an opening <cflock> tag in your code, it requests the corresponding lock from the server. There is only one available lock for each scope (Application, Session, Request, or Server), which is why it’s called “exclusive.” Once this Exclusive lock has been bestowed upon your template, it stays there until the closing </cflock> tag in your code, at which point the lock is released and returned to the server. While your template has the lock ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required