> What's the deal with locking shared scope variabled in CF4.0, > which doesn't support the SCOPE attribute for CFLOCK? Instead of: > > <cflock scope="APPLICATION" type="READONLY" timeout="10"> > temp = application.variable; > </cflock> > > Should I use: > > <cflock type="READONLY" timeout="10"> > temp = application.variable; > </cflock> > > ???? Does this do the same job? I suspect not, as the SCOPE > attribute wouldn't be necessary if this was the case...
You'll have to use the NAME attribute. To do this, you'll need an effective unique value (unique across the entire server) to specify as the name. Originally, Allaire recommended that you might evaluate Application.Name or Session.SessionID for these values, but of course that's a problem, since reading those variables requires a lock! In your case, where you're locking the application scope, I'd simply use the name of the application: <cfapplication name="foo" ...> <cflock name="foo" ...> For the Session scope, you might simply read the CFID and CFTOKEN values from the cookie or URL scope, depending on which it's in. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 ______________________________________________________________________ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

