2 Replies Latest reply on Feb 17, 2011 6:17 AM by galder.zamarreno

    Realtionship of Hibernate second level cache and Ifinispan as shared cach

    meenarajani

      Hi

       

      I want to cache a simple Book Author application and tweak the caching according to the freshness requirements of the users. My question is Can we use Infinispan as shared cache without using Hibernate or Hibernate second level cache??

       

      I have found some stuff which says infinispan as hibernate second level cache. But what if I just do not want add an extra layer of hibernate just use Jboss container which has entity beans and we can cache it by adding Infinspan???

       

       

      The other thing which is not clear even in case of I have to use any third party ORM , which itself has second level cache. So where will the Infinispan fall and what is good reason for using Hibernate second level cache or infinisoan as hibernate second level cache. It is bit confusing.

       

      Any help will be appreciated\

       

      Thanks

      Meena

        • 1. Realtionship of Hibernate second level cache and Ifinispan as shared cach
          galder.zamarreno

          I want to cache a simple Book Author application and tweak the caching according to the freshness requirements of the users. My question is Can we use Infinispan as shared cache without using Hibernate or Hibernate second level cache??

           

          Yes, of course. Nothing stops you from starting your own Infinispan cache manager, creating caches and putting data in it, separate from the Hibernate 2LC.

          I have found some stuff which says infinispan as hibernate second level cache. But what if I just do not want add an extra layer of hibernate just use Jboss container which has entity beans and we can cache it by adding Infinspan???

           

          You can run Infinispan in JBoss AS, see section on JBoss Application Server in http://community.jboss.org/docs/DOC-13439

           

          The other thing which is not clear even in case of I have to use any third party ORM , which itself has second level cache. So where will the Infinispan fall and what is good reason for using Hibernate second level cache or infinisoan as hibernate second level cache. It is bit confusing.

           

          So far, Infinispan only integrates in Hibernate. It does not integrate into other ORMs. If you're using Hibernate as ORM, we recommend Infinispan because the integration is finely tuned to make the most of the Hibernate 2LC use case. In fact, a lot of the lessons learned from the JBoss Cache integration with Hibernate 2LC have been migrated to Infinispan 2LC code. So, with Infinispan 2LC, you get both a highly performant 2LC backed by a team that has been working on Hibernate 2LC for over 5 years.

          • 2. Realtionship of Hibernate second level cache and Ifinispan as shared cach
            galder.zamarreno

            But as always, don't take our word for it. Go out and try your application and your use case with different ORM/2LC providers and see what you get