> The transaction won't actually isolate you from a race condition.
> Other connections will be able to insert at the same time.  A full
> table lock, on the other hand, will protect you.  A unique key
> constraint would also do it.

Umm... I was under the impression that a serializable transaction lock
would lock the table. If you omit the isolation, the database may not
necessarily serialize it -- but the whole point of the serializeable
isolation *is* to single-thread access to those resources for the
purpose of eliminating race conditions. Docs seem to confirm that notion -
this is from the CF7 docs for cftransaction: 

* serializable: places an exclusive lock on every data table in use for
the duration of the transaction. Causes access to the database to be
single-threaded and is therefore not recommended for normal database
access.

http://livedocs.adobe.com/coldfusion/7/htmldocs/00000346.htm

Thing is, I believe according to standard serializable is supposed to be
the default (I'm actually not certain of that, but remember Jochem
saying something about it)... however, because databases are notorious
for being iffy on standards support, etc. it's generally better to
explicitly declare the isolation in the cftransaction tag, since the
docs say it'll use whatever the default is for the associated database
if you omit it. May be okay to omit if you know for example that your
company always uses a specific db platform configured a particular way
and therefore always means a default isolation of x, but for me, that's
still an area where I'd rather just specify it in the tag. 

This from a guy who likes to use a tool to generate his forms that
eliminates the need to specify value attributes. :P 

-- 
s. isaac dealey  ^  new epoch
 isn't it time for a change? 
     ph: 503.236.3691

http://onTap.riaforge.org/blog



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:298760
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to