Hey George...
Trust me, you ain't the only one. ;) A CFC is "executable CF" so when you
create an instance in a shared scope, that instance is created with the
codebase in existance at the time it was instantiated. When you update the
text in the code base, that does not update the contents of the CFC that's
in a shared scope. In order to do that you have to use code like below, or
restart the server.
I assume you have this CFC in the application or session scope, yes? Try
this:
<cfif structKeyExtists(url,"reinit")>
<cfset session.myLogger = createObject("component","my.logger.path.to.the
").init()>
</cfif>
(be sure to add locking. and be sure to use the right scope left of the
equal sign.) ;)
Then go to your page and add ?reinit=1 to the URL. Voila...
As far as which scope to use... don't feel restricted. There's no reason you
couldn't call application.logger.logUserAction(), for one thing. For
another, if you have a logger class that's portable, why not use it in the
app AND session scopes -- if, that is, they're doing different things. Just
be sure that the primary methods in your application scope are thread safe (
i.e. use locking where required and accept parameters, use the var keyword,
draw constants from the logger's instance data but don't affect that
instance data). In general, anyway.
Laterz,
J
On 9/15/05, George Abraham <[EMAIL PROTECTED]> wrote:
>
> 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.
>
> 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.
>
> 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.
>
> Thanks,
> George
>
>
>
--
---------------
-------------------------------------
Buy SQLSurveyor!
http://www.web-relevant.com/sqlsurveyor
Never make your developers open Enterprise Manager again.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:218450
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