Doing is is as simple as this:
<cfset application.varPass =
createObject("component","CFC.varpass").varpass(url,"URL","displaymode")>
As far as the advantage, it comes primarily from being able to use an
existing instance instead of having to create a new instance for every
request. Whether or not that's beneficial to you is a matter of your
needs... :)
The thing is, that instance is active as long as the application scope
exists... i.e. until the server's rebooted or the application times
out.
You can even use CFINVOKE against it:
<cfinvoke component="#application.varPass#" method="varpass"
returnvariable="varpass" stAttribs="#url#" style="URL"
exceptions="displaymode" />
You'll probably want to lock that call, too...
There ya have it!
J
On Apr 5, 2005 2:36 AM, Duncan <[EMAIL PROTECTED]> wrote:
> it does work, yes. The only way I could find. Thanks for the info here
> I will give it a crack. One other thing, I have seen people talk about
> instatiating the cfc in the application scope. Whats the benefit of
> that and how is it done?
>
--
> Duncan I Loxton
> www.mcgrath.com.au
> www.sixfive.co.uk
> [EMAIL PROTECTED]
>
> ----------------------------------------------------------
> 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).
>
> An archive of the CFCDev list is available at
> www.mail-archive.com/[email protected]
>
>
--
Continuum Media Group LLC
Burnsville, MN 55337
http://www.web-relevant.com
http://www.web-relevant.com/blogs/cfobjective
----------------------------------------------------------
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).
An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]