Friday, May 31, 2013

MongoDB as a cache store for Infinispan ?!

For 1 year now, I'm working as a contributor on Hibernate OGM. Few months ago, Sanne asked me to create a MongDB cache store for Infinispan. Now thanks to Sanne and Mircea I have made it possible and it will be available with the 5.3 release of Infinispan.
The next question you may have, is "Awesome how can I use it ?". Well it's pretty simple, there are actually 2 ways, the xml file and the programmatic api.

Here is a snippet of the XML configuration:
Followed by a snippet of the programmatic API:
Of course, you need to have an external MongoDB instance running somewhere :) If you want to have some MongoDB features available in Infinispan, don't hesitate to contact me or the Infinispan team. And of course, feedbacks are more than welcome.


  1. hi,
    Please share some working example using infinispan and mongodb as hibernate second level cache

  2. I am getting error using this
    Unable to invoke method public void org.infinispan.loaders.CacheLoaderManagerImpl.start() on object of type CacheLoaderManagerImpl

    Can not load null class!!

    1. Hello,

      I've been told about this, I'll push a fix ASAP

  3. Nice sharing. MongoDB is a widely used open source database system. Scop for mongodb is increasing day by day. Learn MongoDB Training from expert reach gangboard. Selenium Training