[Opensymphony-oscache] Receiving cache flush with a Message Driven Bean

Elio Damaggio <[email protected]> Fri, 24 Feb 2006 03:33:31 CST
Newsgroups gmane.comp.java.open-symphony.os-cache
Message-ID <6773698.1140773646979.JavaMail.os-j2ee@opensymphony01.contegix.com>
Hi to all,
I am a long time fan of OSCache.

I am writing a big CMS application in which an administration part (deployed on some machines) issues flush requests to the content serving part (deployed on other machines).

I am not using the OSCache libraries for clustering. I am sending simple JMS messages with lists of group to be flushed.
The problem I have is that in my mdb I cannot access the servlet context in which the ServletCacheAdministrator is stored.

My optimal solution would be to force the CacheTag to use a GeneralCacheAdministrator instead of a ServletCacheAdministrator (I have application generated cache keys).
I wanted to configure the Cache with Spring  in a way similar to what I found in the docs and then have the CacheTag use it instead of the ServletCacheAdministrator. The problem is that the CacheTag is not extendable, and I do not find a way to have it use a user supplied CacheAdministrator.

I think that being able to extend the CacheTag to have it use other CacheAdministrator could be a great option in many cases in which you have a more complex deployment that a simple web app.
What do you think?

ps I was thinking about having an Interface instead of the dependency of ServletCacheAdministrator for the admin field in the CacheTag class. Then create to protected method "getCacheAdministrator()" and "getGeneratedClass()", in order to provide the possibility to extend the tag class. My other option would be a much less clean "copy&modify" of the CacheTag class.

I eagerly wait your responses...
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=19797&messageID=38623#38623