0

This references a question I asked earlier: Scaling and Clustering JPA. It appears there are many choices when it comes to the use of a JPA Cache. I am leaning towards memcached since it appears to have broad support, including outside of Java environment. I have used ehcache outside of JPA in the past and have liked it. My constraint is that I am on JBoss 7 with MySQL Cluster as backing storage. Our JPA provider currently is Hibernate but we are open to change if there is a robust provider that is easy to work with vis a vis distributed caching. My choices appear to be:

  • Memcached
  • Ehcache
  • JBoss Cache
  • Toplink Grid

I would love to hear qualified answers that would let me choose.

Thanks for your insights.

-Raj

Community
  • 1
  • 1
Raj
  • 2,852
  • 4
  • 29
  • 48
  • Your choices are actually defined by your JPA implementation and what it provides support for, yet you don't say which that is ... – DataNucleus Apr 26 '12 at 17:38
  • Hi DataNucleus, thanks for your comment. We are currently on Hibernate and open to change. I updated the question description above. – Raj Apr 26 '12 at 17:47

2 Answers2

1

Ehcache is ok - solid project. There were (are?) problems with JBoss Cache performance [http://stackoverflow.com/questions/6346357/performance-of-jboss-cache-and-ehcache]. I would add to the list infinispan (by JBoss people as well), but I've never used it.

Piotr Kochański
  • 21,862
  • 7
  • 70
  • 77
  • Hi Piotr, thanks for your response. JBossCache seems EOL. Infinispan's website seems to say effusively good things about it (surprise!). Do you know which JPA provider it plays well with? – Raj Apr 26 '12 at 18:28
  • For sure it works properly with Hibernate JPA implementation. – Piotr Kochański Apr 26 '12 at 18:31
0

You can try Hazelcast. It provides Hibernate 2nd level cache out of the box. See http://hazelcast.com/docs/2.1/manual/single_html/#HibernateSecondLevelCache for more information

Note: I work for Hazelcast

Fuad Malikov
  • 2,325
  • 18
  • 20