ColdFusion manages database transactions with the cftransaction tag, which groups multiple queries into one atomic unit so they all commit together or all roll back together — enforcing the ACID guarantee that partial writes never persist. You control it with action="begin|commit|rollback|setsavepoint", tune concurrency with isolation="read_uncommitted|read_committed|repeatable_read|serializable", and (since ColdFusion 8) undo part of a transaction with savepoints. Two things trip teams up. First, a cftry/cfcatch inside a cftransaction swallows the exception that would trigger automatic rollback — so a caught error can leave a partial write committed unless you explicitly call in the catch. Second, deadlocks ("Transaction was deadlocked on lock resources... chosen as the deadlock victim. Rerun the transaction") happen when concurrent transactions lock the same rows in different orders — fixed by keeping transactions short, accessing tables in a consistent order, indexing, choosing an appropriate isolation level (prefer READ COMMITTED over SERIALIZABLE), and retrying with exponential backoff. This guide covers cftransaction, isolation levels, and deadlocks with working code.
Read More
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)