JDO defines levels of caching that are appropriate for an implementation. JPOX provides a facility for caching that meets the specification, but in addition allows the use of third party caching tools (such as Tangosol Coherence, OSCache, etc). There are 3 levels of caching available with JPOX.
By default in JPOX, Level 1 Cache is enabled. The user can configure Level 2 Cache and also Level 3 Cache if they so wish. These are defined by use of the PersistenceManagerFactory property
So if a PersistenceManagerFactory has a org.jpox.cache.jdoinstances.group defined, it will have Level 2 caching, and if there are more than 1 PersistenceManagerFactory object with the same value, then they will have Level 3 caching. You have one additional control over the JPOX internal cache behaviour. This is achieved by use of the PersistenceManagerFactory property
As mentioned above, external caching products can be used with JPOX. These are specified by use of a cache plugin. This is specified by way of a PersistenceManagerFactory property org.jpox.cache.jdoinstances.plugin, which specifies the class name of the plugin. The plugin provides an interface to the external product. It is planned to write plugins for the majority of external products available. In the meantime you can always write your own plugin to interface with your caching solution. |