Hi,
I need to cache a singleton type of component in the application scope 
so that multiple sessions can make use of it. However the component 
would be used rarely, and may take up significant resources, so I'd like 
to remove it whenever it's not in use (ie when the last session thats 
using it is destroyed).

ie, The seuqence of events would be something like this:

Two users come along, the user1 does something that uses my singleton 
component, so I create it, and cache it in application scope.
User2 also starts using it while user1 is also using it.

User1 closes their browser, but user2 continues using the compionent for 
a while.

Then user2 closes their browser, so noone is now using the component, so 
remove it from the application scope.


I could write some Java classes to do this, but I'm guessing someone 
else has needed this before, so has it been written already?

Chris

-- 


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188494
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