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.