-
1. Re: Hibernate OMG -> Infinispan -> Relational Database (mysql)
davided80 Jul 30, 2013 8:58 AM (in response to rkgupta12)Hi,
in the source code of OGM we have some integration tests for Infinispan.
You can find the sources on github: https://github.com/hibernate/hibernate-ogm
Shortly, Using Arquillian we deploy an EJB on JBoss AS and we call the methods of the EJB to create some entites that are stored in Infinispan.
This is the integration test class (InfinispanModuleMemberRegistrationIT): https://github.com/hibernate/hibernate-ogm/blob/master/hibernate-ogm-integrationtest/hibernate-ogm-integrationtest-testcase/src/test/java/org/hibernate/ogm/test/integration/jbossas7/InfinispanModuleMemberRegistrationIT.java
This is the bean that persists and looks for the entities, in this case it simulate the registration of new members to a fake service: https://github.com/hibernate/hibernate-ogm/blob/master/hibernate-ogm-integrationtest/hibernate-ogm-integrationtest-testcase/src/test/java/org/hibernate/ogm/test/integration/jbossas7/controller/MemberRegistration.java
We are not using MySQL but it shiuld be easy to add it if you change a bit the configuration of infinispan.
Cheers,
Davide