Log In | Sign Up   View a printable version of the current page.
  Dashboard > flexive > ... > Developer Info > Backing Cache

Added by Markus Plesser, last edited by Markus Plesser on Dec 06, 2007
Labels: 
(None)

Backing Cache

[fleXive] provides a vendor agnostic mechanism to use backing caches for environmental data and contents.
Originally based on JBoss TreeCache caching is still hierarchical utilizing paths, keys and values as described in the JBoss TreeCache documentation.

We deploy our own Caching MBean com.flexive.ejb.mbeans.FxCache which is registered if not present in com.flexive.shared.CacheAdmin.getInstance() using a standard Java MBeanServer approach.
Previously we held our own TreeCache instance in FxCache, what we do now is creating a FxBackingCacheProvider from FxBackingCacheProviderFactory.
A FxBackingCacheProvider has to implements FxBackingCache which in turn provides all interfaces needed to access a hierarchical cache.

FxBackingCacheProvider's are implemented in com.flexive.shared.cache.impl
Out of the box we create our own TreeCache instance or connect to an existing one that is bound to JNDI.
To provide support for 3rd party Caches like GigaSpaces or Tangosol it is enough to implement com.flexive.shared.cache.FxBackingCacheProvider and provide the System property "com.flexive.shared.cache.FxBackingCacheProvider" like "-Dcom.flexive.shared.cache.FxBackingCacheProvider=some.class"

The following strategy is applied to find a working FxBackingCacheProvider:

  1. if System property is set try to obtain a new instance of the given class
  2. try to get a JNDI TreeCache instance with key "FxJBossTreeCache"
  3. create a local TreeCache MBean

The configuration for the embedded TreeCache instance is found at src/framework/resources/embeddedJBossCacheConfig.xml whereas a sample service to be deployed in JBoss can be found at src/framework/resources/JBossCacheJNDI-service.xml (which has to be copied to the respective deploy directory)

Site running on a free Atlassian Confluence Open Source Project License granted to [fleXive] . Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.6.1 Build:#916 Nov 09, 2007) - Bug/feature request - Contact Administrators