The session variable is the same for all users for a particular client, so the lock name will be the same for all users for that client, which is what we want. I don't want to go into why these things are what they are because it would require a book and its an excellent example of bad design.
With regard to the CFC, I was thinking about that too, but all orders are created through this code block. There is no where else that calls that CFC (I've accomplished that much at least). > -----Original Message----- > From: Dan G. Switzer, II [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 18, 2007 11:28 AM > To: CF-Talk > Subject: RE: Exclusive locks still producing duplicate values > > ><cflock name="#session.st#ProcessLock" timeout="20" type="exclusive"> > > > >I'm taking a bit of a guess here, but I think your name may > be the problem. > >I'm assuming that by having a session variable in the name, > each user > >will have a different name for the lock. Named locks are > only locked > >from blocks with the same name. If each user is getting a > unique name, > >then the block will not be locked between users. That is my > >understanding of locks at least. > > > >If this is the case, you want a single, discreet name for > the lock so > >that all users use the same named lock and thus can only use > the block > >of code one at a time, which I believe is your requirement. > > The fact that the lock is given a name based upon a session > variable is definitely a problem--that only guarantees that > the locked code won't run for sessions where the variable > "session.st" is identical. I'm guessing that variable is > unique per session. > > Also, just because you lock code calling the ReqNumbering.cfc > component, the code in that component is not necessarily > locked. That means if RegNumbering.cfc is called from other > places outside of this "locked" code, it would run unlocked. > > -Dan > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:295032 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

