What scope wouldn't you be able to access with a scheduled task? A scheduled task should be able to access any scope in the application.
You could also consider reusing expired slots instead of full-on garbage collection. In other words - when allocating a new object, just search through your cache and allocate the new object in the first expired slot that you find, or create a new one if necessary. It creates kind of a "lazy" cache that way - you may have expired objects in there, but if there's no side-effect to having them, then it doesn't really matter. That alleviates the threading issue altogether. And IMO, if you can avoid having to do it asynchronously, it'll save you a lot of pain down the road. Roland -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mark Mandel Sent: Monday, May 08, 2006 7:34 PM To: [email protected] Subject: Re: [CFCDev] Deploying Java Code with your ColdFusion app Thanks for the reply all - The only issue I have with the scheduled task is that this needs to be run on a CFC instance data, that could be stored anywhere, hence the need for a async process that can be run anywhere. I'm going to travel down the road, and see where I end up. Thanks for your input :oD Mark On 5/9/06, Robert Munn <[EMAIL PROTECTED]> wrote: > I just built something like this a little while ago. I built it in CF and I > am using a scheduled task to clear out expired objects. I might re-factor > the cache class itself into Java, but I would probably still use a scheduled > task to clear expired items. > > > On 5/8/06, Tom Chiverton <[EMAIL PROTECTED]> wrote: > > >>> On Mon, May 8, 2006 at 6:26 AM, in message > > > <[EMAIL PROTECTED]>, > > [EMAIL PROTECTED] wrote: > > > Does this seem like a viable use of the bridge between Java and > ColdFusion? > > > > Yeah, sure. > > > > > Do you see any issues with deployment with this approach? > > > > No, I've done something similar in the past. > > > > > Does it seem like overkill? > > > > Writing it in Java to get around an async processing problem certainly > does - the clean up thread could be a simple CF scheduled task for instance. > > > > > > Tom Chiverton > > -- E: [EMAIL PROTECTED] W: www.compoundtheory.com ICQ: 3094740 ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). An archive of the CFCDev list is available at www.mail-archive.com/[email protected] ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
