Thursday, 30 May 2013
Good news everyone - Infinispan 5.3.0 will be introducing a long awaited JPA cache store. This cache store will allow you to store cache entries in the database using proper schema - so that other applications can read the persisted data as well.
In normal use cases, it’s recommended to leverage Infinispan as JPA second level cache and/or query cache. However, if you’d like to use only Infinispan API and you want Infinispan to read from database, or to persist the data into a database with well defined schema, then JPA cache store could be right for you.
Prior to JPA cache store, those who wants to use Infinispan in front of a database to read/write database records would need to write their own cache store implementation. Now, with JPA cache store, users can use Infinispan in front of a database (write-through or write-behind) with ease by using standard JPA mapping and configurations.
To use the cache store is simple - create the standard JPA configuration (persistence.xml) and entity class, and then configure the cache store:
Please see documentations for detailed sample usage and configuration.
Hope you enjoy this new addition!
Tags: jpa hibernate cache store