On 6/4/05, Phil Cruz <[EMAIL PROTECTED]> wrote: > Regarding the use of CFHTTP, I read a comment by Christian on this blog post > (http://www.compoundtheory.com/?action=displayPost&ID=21) > that says you should use a named lock around CFHTTP, so would this be the > correct implementation of a CFC method using CFHTTP (of a CFC in a shared > scope)?
If you're still using CFMX 6.1, you could either use that technique or simply move the <cfhttp> call into a lightweight component that is created on each request - so someFunction() would do a <cfinvoke component="myCFHTTPCFC" method="doCFHTTP" returnvariable="httpResult"/> and the myCFHTTPCFC would be created (and destroyed) for each request. That avoids locking - and single-threading, if your application calls this method a lot. If you're on CFMX 7, just create a local var variable, e.g., httpResult, and specify result="httpResult" in the <cfhttp> tag. Then use httpResult.xxx instead of CFHTTP.xxx -- Sean A Corfield -- http://corfield.org/ Team Fusebox -- http://fusebox.org/ Got Gmail? -- I have 50, yes 50, invites to give away! "If you're not annoying somebody, you're not really alive." -- Margaret Atwood ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). CFCDev is supported by New Atlanta, makers of BlueDragon http://www.newatlanta.com/products/bluedragon/index.cfm An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
