On Wednesday, Aug 27, 2003, at 14:14 US/Pacific, Brad Roberts wrote: > My CFC is over 1200 lines of code. I can't put it into server or > application scope because if the CFC is executed by simultaneous > requests, a > second call to the CFC might overwrite data in the first call. How > might > cflock come into play?
So, you're saying that the CFC has instance data (in 'this' scope or 'variables' scope (CFMX6.1) or the unnamed scope) that varies for each user? > The only thing I think I'm left with is the session scope, but it > seems like > I'd get better performance by just not caching it. You'd probably do better by refactoring your design - break the CFC into two pieces: - a smaller, simpler CFC that has the instance data - which you store in session scope - the bulk of the logic written as a stateless service CFC - which you store in application scope The latter is created once (at startup) and manipulates instances of the former, one per user (well, one per session). Look up a design pattern called Session Facade for more hints and tips. Sean A Corfield -- http://www.corfield.org/blog/ "If you're not annoying somebody, you're not really alive." -- Margaret Atwood ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Get the mailserver that powers this list at http://www.coolfusion.com

