ColdFusion has been around for quite some time now and a new version is on the horizon.
Do you currently use ColdFusion in your Web site and application development? Are you considering it?
Discussion on:
View:
Show:
Cold Fusion 7 has arrived! (Feb 07 2005)
No doubt since it's introduction some 10yrs back its helping enterprises world wide to successfuly deploy robust web applications in record time!
It's getting better and robust with each release.
No doubt since it's introduction some 10yrs back its helping enterprises world wide to successfuly deploy robust web applications in record time!
It's getting better and robust with each release.
A few people have emailed me asking why I am using two checks for the structKeyExists() calls. Here is the reason why: this is called "double checked locking" and to see why it's used it might be easier just to show an example:
1. User A's thread gets to , which evaluates to true.
2. User B's thread gets to , and it also evaluates to true.
3. User A's thread gets to the cflock tag and creates an exclusive lock on the code contained in the lock tags.
4. User B's thread gets to the cflock tag, but User A already has an exclusive lock so User B must wait for the lock to be released.
5. User A's thread gets to the second , which is still true.
6. User A's thread creates the newsManager object.
7. User A's thread releases the exclusive lock.
8. User B's thread now continues executing. It gets an exclusive lock on the code. It gets to the second , but *that now evaluates to FALSE* because the newsManager *does* now exist in the application scope. User B's thread skips that cfif (and does not recreate the object).
9. Both threads keep processing the rest of the request...
1. User A's thread gets to , which evaluates to true.
2. User B's thread gets to , and it also evaluates to true.
3. User A's thread gets to the cflock tag and creates an exclusive lock on the code contained in the lock tags.
4. User B's thread gets to the cflock tag, but User A already has an exclusive lock so User B must wait for the lock to be released.
5. User A's thread gets to the second , which is still true.
6. User A's thread creates the newsManager object.
7. User A's thread releases the exclusive lock.
8. User B's thread now continues executing. It gets an exclusive lock on the code. It gets to the second , but *that now evaluates to FALSE* because the newsManager *does* now exist in the application scope. User B's thread skips that cfif (and does not recreate the object).
9. Both threads keep processing the rest of the request...
i want to know how coldfusion can persist a cfc variable ( a structure) between calls from flash.
- Keyboard Shortcuts:
- Prev
- Next
- Toggle









































