Hi,
I've been beating my head all day developing some code for a generic,
configurable object cache that I can use, primarily for Transfer.
The will (eventually) be able to be set on how long objects can be
cached for, and also how many are allowed to be in total.
The issue was garbage collection - at some point I would have to go
through the collection of objects and remove any that had exceeded
their set time out, or even just remove it down to the set number of
objects.
That being said, it would seem to me the garbage collection process
should be asynchronous. There is no reason that a user should be
hanging out waiting for my collection set to do some house cleaning.
I tried for HOURS to get CF to do a generic async method to call
method on an already instantiated CFC. Very painful, and didn't work.
And then I was thinking - if I use URLClassLoader, why can't I just
write my entire caching mechanism in Java, and thereby create Threads
and do what I like when I like to.
At the end of the day, it's just objects being put into some
Collections, so it seems to make sense.
Now the issue I have to question is deployment. The way I see it
structured is that I would have a
/caching/
+ - CacheManager.cfc (or something)
+ - /lib/
+ - Caching.jar
Sort of scenario, in which on the init of CacheManager, it would load
up a URLClassLoader, get it's own absolute path from
getMetaData(this).path, and then load in the jar file.
From there instances of the caching mechanism could be created quite easily.
The questions are, however:
Does this seem like a viable use of the bridge between Java and ColdFusion?
Do you see any issues with deployment with this approach?
Does it seem like overkill?
Figured I would get your thoughts on this -
Mark
--
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]