-
1. Re: Infinispan and database connection
amalrajvinoth Jun 22, 2011 1:16 AM (in response to vinod123)Hi vinod,
you can use infinispan 2nd level cache:
you could get some idea from following links:
http://community.jboss.org/wiki/UsingInfinispanAsJPAHibernateSecondLevelCacheProvider
http://community.jboss.org/wiki/InfinispanTechnicalFAQs#Hibernate_2nd_Level_Cache
thanks,
Amal raj.
-
2. Re: Infinispan and database connection
vinod123 Jun 22, 2011 2:17 AM (in response to amalrajvinoth)HI Amal raj,
thanks for reply, i am new in infinispan so can you describe stepwise.
what i done as follow i downloaded the infinispan 4.2 version, java 6 and i run the hotrod server client successfully and also i run the default java class in which i create the cache and done operation in it.so this is right way or wrong
what i want to do with infinispan
I want to fetch data into infinispan when i run program and if there changes that reflect in database.
-
3. Re: Infinispan and database connection
manik Jun 23, 2011 11:17 AM (in response to vinod123)You don't need Hot Rod.
Do you access your database via Hibernate/JPA?
-
4. Re: Infinispan and database connection
vinod123 Jun 23, 2011 11:25 AM (in response to manik)Hi Manik ,
I am new in Infinispan so i dont have much idea about the infinispan so may be i wrong..
So can u guide me. What i wan t to do is i have one Primary database there store the data table i want to fetch the data in infinispan so today i read this link http://docs.jboss.org/hibernate/ogm/3.0/reference/en-US/html/index.html but i dont understand much of that i download the require "hibernate-ogm-3.0.0.Alpha1-dist" but dot get idea about how to run this and how to attach to primary database can you please guide me how to develop this application
Thanks
Vinod Mehta
-
5. Re: Infinispan and database connection
vinod123 Jun 23, 2011 1:51 PM (in response to vinod123)right now i am doing
i am using hibernate for accessing primary database
download the set all the OGM and try to deploy but i get error of jboss server error of deployment can any one help me
-
6. Re: Infinispan and database connection
vinod123 Jun 24, 2011 3:09 PM (in response to vinod123)HI
I created the application that have hibernate and primary database which run succeefully now i want to add infinispan to it so
mean i want to add infinispan such like that after fetching the data from primary database it come in to infinispan
Thank you
-
7. Re: Infinispan and database connection
vinod123 Jun 25, 2011 12:52 PM (in response to vinod123)Please anybody help me
-
8. Re: Infinispan and database connection
sannegrinovero Jun 26, 2011 12:54 PM (in response to vinod123)Hi vinod,
Hibernate OGM doesn't have a notion of "primary database" to load the objects from, so today it's not possible to "load" all the data from a database and dump it into Infinispan. You can do it yourself, but this is not automated by Infinispan nor Hibernate OGM.
You could configure two different Hibernate SessionFactory instances: one running OGM on Infinispan, one running the traditional Hibernate on your database, and then copy over all your data from one to the other but you'll have to write some code to load from one, and store in the other.
Also, please use Hibernate OGM Alpha-2, not Alpha-1.
Are you sure you don't want to use Hibernate on the database (in "traditional" way) and enable the second level cache to use Infinispan as suggested by Amal raj?
-
9. Re: Infinispan and database connection
vinod123 Jun 27, 2011 10:59 AM (in response to sannegrinovero)Hi Sanne Grinovero,
Thanks for reply.
NO,I use the traditional way of hibernate to access thedatabase, I create the infinispan cache there and access the primary database and fetch the values and put into infinispan created cache.so here i not taken then hibernate OGM is it right?
Thanks Again for reply
-
10. Re: Infinispan and database connection
pmuir Jul 5, 2011 1:25 PM (in response to vinod123)From what you say, just use the Hibernate 2nd level cache backed by Infinispan. See https://docs.jboss.org/author/display/ISPN/Infinispan+as+Hibernate+2nd-Level+Cache+in+JBoss+AS+5.x