We are planning to setup the new cache server using infinispan data grid cache and hibernate.
how will populate or retrieve the cache from cache server using hibernate.
means, how will we tell hibernate use the cache server machine to store or retrieve entity, collections , Query and TimeStamp level cache.
Database is on server A and code is on server B.
Cache is on server C.
we need to store the second level cache in server C.
Well, simply read the docs, as usual:
- Infinispan: http://community.jboss.org/wiki/UsingInfinispanasJPAHibernateSecondLevelCacheProvider or http://community.jboss.org/wiki/InfinispanTechnicalFAQs (section named "Hibernate 2nd Level Cache")
So you want to run a first machine if an Hibernate-powered application, configure it such that Hibernate on this machine would use an Infinispan remote cache as 2nd level cache hosted on another machine ?
Sorry, but I don't see the rational behind this setup... usually, the 2nd level cache is kept on the same host as Hibernate...
Anyway, Infinispan has something called RemoteCache which is simply a client to access a remote cache (hence the name). Maybe you should look into that direction...