On Wed, 3 Nov 2004 13:35:06 -0800, Barney Boisvert <[EMAIL PROTECTED]> wrote: > userHome is a gateway, among a other things. > > You might be right about the lock. Depends on how your database > implements the transactional locking. You can certainly do a > read-only table lock for the check, and then escalate the lock to > exclusive for the INSERT and know you've gotten it beaten that way. > Or, you just assume it works (which it should), and let the unique key > in the database be your ultimate safeguard. Didn't I just say that I > never trust keys a couple messages ago? I'm such a liar. ;) > > I'm not sure why Sean didn't bring up transactions in that message on > the Mach-II list. Maybe he knows something I don't. CFLOCK is > definitely an effective way to ensure integrity (assuming all access > is via your CFC, a restriction transactions and/or DB locks don't > have), but I don't think it's a necessary one. Maybe he'll chime in > and explain why I'm wrong, as he is so good at doing? > > cheers, > barneyb
This is a great discussion. Thanks for sharing your thoughts (in detail). I don't think the readonly/exclusive db locks will do the trick. I think databases do implement common mechanism for transactional locks for uniqueness. It's called a "unique key" ;) On another note, what does userHome do besides gateway functions? -Phil ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' in the message of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.com). An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]
