> Isaac,
> SQL Server 2K. I renamed the stored procedure name in the
> cffunction, not in
> the db. It is in the application scope, but how does one
> recreate it -
> simply set it to null? I did have to restart the CF server
> service to get
> rid of this finally.

Yeah, that would do it too...

When you store a CFC in a persistent scope, any changes you make to
the CFC won't be reflected in your application until you recreate the
CFC by calling createObject() or using the <cfobject> tag again... so,
for instance if you have this in your application.cfc

<cffunction name="onApplicationStart">
        <cfset application.myFactory = createObject("component","factory")>
</cffunction>

Then if you make any changes to the factory.cfc you would need to
re-execute this line:

<cfset application.myFactory = createObject("component","factory")>

I believe (don't quote me) that you can do that actually by
instantiating the application.cfc within the page and then calling
appcfc.onApplicationStart() which might be useful if you happen to be
instantiating a lot of application scope CFC's in the
onApplicationStart event.

> I guess I am really curious why there is no info on
> this anywhere. At least I can't find any. Seems to me
> that no one else has run into this while developing
> CFCs. I change my stored procs so many times, that
> using CFCs this way would have me restart the CF
> service every so often. I must be doing something
> fundamentally wrong somewhere.

Nah... I think people may have been confused by your original post and
were thinking (like I was) that the name had been changed in the db
rather than in the CFC... Once I know the name change occurred in the
CFC, then shared-scopes is the first thing that comes to mind for me.
:) And once you're done with the development of your shared-scope
cfc's, then the thing should run smoothly without needing to recreate
them in production.

> A related question: would you instantiate an object
> that does auditing in the application scope or in
> the session scope? Initially I thought that since
> auditing is individual for every user, it should be
> in the session scope, but then some examples seem
> to suggest that instantiating it in the
> application scope is fine.

I'd have to know more about the specifics of your application to give
a really useful opinion on that... What kind of audit is this,
where/how is the audit used? If it's just to get a query for a report,
then there's a good chance using a CFC is overkill (unless you're
building it into a larger object that performs other related tasks).



s. isaac dealey   954.522.6080
new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework

http://www.fusiontap.com
http://coldfusion.sys-con.com/author/4806Dealey.htm




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:218416
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to