It is as long as it is thread safe...

But to be honest I wouldn't do it.




On 3/6/07, Janet MacKay <[EMAIL PROTECTED]> wrote:
>
> Is it safe to call cfmodule from within a CFC stored in the application
> scope? I think the example below is safe because the custom tag only
> manipulates the caller's var scope. Can anybody see any other problems?
>
> <!--- MyComponent.cfc --->
> <cfcomponent>
>        <cffunction name="init" access="public" output="true"
> returntype="MyComponent">
>                <cfreturn this/>
>        </cffunction>
>
>        <cffunction name="runCustomTag" returntype="date" output="true">
>                <cfset var tagOutput = ""/>
>                <cfmodule template="MyCustomTag.cfm"
> outputVariable="tagOutput" />
>                <cfreturn tagOutput/>
>        </cffunction>
> </cfcomponent>
>
> <!--- MyCustomTag.cfm --->
> <cfparam name="Attributes.outputVariable" type="string"/>
> <cfset Caller[attributes.outputVariable] = now()/>
> <cfexit method="exittag"/>
>
>
> Janet
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 & 
Flex 2. 
Free Trial 
http://www.adobe.com/products/coldfusion/flex2/

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:271630
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to