Andrew, Can you elaborate on the problems you've seen loading Application scoped objects into the request scope? We're having some problem with this as well, re: garbage-collection. Is there any documentation you can point me at for this issue?
What alternative do you recommend? Just always calling the shared-scope object directly, instead of referencing the request scoped object? For what it's worth, the request scoped object would just be a pointer to the App-scoped object. So on request end, the pointer should be set null, and should be garbage-collectable, right? Cheers, Kris On Tue, Jul 13, 2010 at 3:22 PM, Andrew Clarke <s...@clarke.ca> wrote: > > I took a quick read through your email and couldn't find anything inherently > wrong with the design IMHO. Having 60 objects in the application scope I > presume is analogous to saying you have 60 singletons. Let's say you have 10 > simultaneous requests at any given point. It's better to have 60 object > instances than 600 which is what you'd get if you put them in the request > scope or somewhere else. > > I also don't see any real issue to having 60 lightweight objects vs. 20 where > each one is 3x as large. They aren't going to multiply as the server loads > up. > > Using application-scoped objects means that you will need to be very sure you > are scoping all your variables correctly to avoid bugs. Also, be sure you're > not adding persistent objects like session or application objects into any > other objects like your request object. I've had JVM GC issues when I've > done that as it seems that the request objects aren't garbage-collected > properly as they contain objects in the session or application scope. Make > sure your variables are scoped properly, make sure you're not mixing your > persistent and non-persistent scopes together (like copying application.foo > into request.bar.foo) and you should be fine. > > - Andrew. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335344 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm