Depends. If you are talking about using CFCs as Web services, then you
have to manually refresh these, though you don't have to do it by
cycling the service. Use the following function:

<cffunction name="refreshWebService" hint="Forces ColdFusion to refresh
all Web services." access="public" returnType="void" output="no">

        <cfargument name="webService" default="" type="string"
hint="Name of the web service you'd like to refresh. If left blank, the
function refreshes all Web services.">
        
        <cfset var factory = createObject("java",
"coldfusion.server.ServiceFactory")>
        <cfset var xmlRpc = factory.getXMLRPCService()>
        <cfset var webServices = xmlRpc.mappings>
        <cfset var mapping = "">
        
        <cfif isEmpty(arguments.webService)>
                <cfloop collection="#webServices#" item="mapping">
                        <cfset xmlRpc.refreshWebService(mapping)>
                </cfloop>
        <cfelse>
                <cfset xmlRpc.refreshWebService(arguments.webService)>
        </cfif>
        
</cffunction>

If, however, you are calling CFCs locally, then ColdFusion /should/
refresh these automatically. The exception, of course, is if you have
turned on the "Trusted Cache" option in the administrator.

That said, I've run into quite a few problems with ColdFusion MX and
caching (not as in CFCACHE, but refusing to generate new class files for
updated templates). Unfortunately, I haven't been able to track down the
source of the problem. Nevertheless, every time it happens, I have to
delete the appropriate class files and cycle the service.

Anyway, the problems I've run into are not consistent, which makes me
think you are referring to the fact that ColdFusion MX does not
automatically refresh Web services. Either that, or you have Trusted
Cache turned on. But if you turned that on, you'd probably know it, and
wouldn't be posting to the mailing list. :)

Benjamin S. Rogers
http://www.c4.net/
v.508.240.0051
f.508.240.0057

-----Original Message-----
From: Willy Ray [mailto:[EMAIL PROTECTED] 
Sent: Sunday, March 09, 2003 1:39 PM
To: CF-Talk
Subject: CFCs - any way to reload other than cycle CF service?


It's really bugging me to have to restart CFMX every time I make a
trivial little change to the component I'm developing.  Is there another
way to get the server to recognize the changes I've made to the CFC?

Willy


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to