Although this won’t necessarily cause a problem for you, you need to be careful of when stepping through code inside a CFLOCK or CFTRANSACTION as you could negatively impact other threads or users. In the case of CFLOCK, you could hold a lock that could hang up others trying to get the same lock. (Locks are a subject of frequent confusion, but further discussion is beyond the scope of this article.) In the case of CFTRANSACTION, you could hold a lock that holds up others trying to access the database you’re processing since CFTRANSACTION (driven by its ISOLATION attribute) can tell the database to prevent other reads or writes during the life of the transaction.
|Server:||ColdFusion 8, ColdFusion 6, ColdFusion 7|
Comments are closed.