Hi Niels,

what you want is the CacheLoader interface, that I'm currently working on. Wait until 
J1 for an announcement. .. :-)

But here's in a nutshell what it does:
- get() fetches the data from cache. If not found, ask the cache loader to load it.
- put() puts the data into the cache. if replicated: replicate across the cluster. If 
CacheLoader is present: store in CacheLoader (e.g. DB)
- evict(): evict just from cache, not from CacheLoader
- remove(): remove from cache and cache loader

Have a look at the CacheLoader interface. I have also written a simple FileCacheLoader 
impl, you can see how it work by looking at the FileCacheLoaderTest unit test.

This is exactly what you want, except that you want a DB-based implementation of 
CacheLoader, which is on the roadmap (possibly using Hibernate), but not yet done.

If you want to implement a CacheLoader for a specific DB, I'd say it should take you 
not more than 2 days.

If you happen to be at J1, be sure to stop by at the JBoss booth: we'll have a live 
demo of the JBossCache and CacheLoader.

Bela

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3839164#3839164

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3839164


-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to