Hello,
I have a JEE (glassfish) application using Hibernate OGM & Infinispan for backend persistence but I do not find the way to store infnispan grid on filesystem and retrieve it after shutdown. The infinispan grid works perfectly in memory.
infinispan.xmlCode:
<?xml version="1.0" encoding="UTF-8"?>
<infinispan xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:infinispan:config:5.1 http://www.infinispan.org/schemas/infinispan-config-5.1.xsd"
xmlns="urn:infinispan:config:5.1">
<global>
</global>
<default>
<loaders passivation="true" shared="false" preload="true">
<loader class="org.infinispan.loaders.file.FileCacheStore"
fetchPersistentState="true" ignoreModifications="false"
purgerThreads="3" purgeSynchronously="true" purgeOnStartup="false">
<properties>
<property name="location" value="../etalab-data/store" />
</properties>
<singletonStore enabled="true" pushStateWhenCoordinator="true" pushStateTimeout="20000"/>
</loader>
</loaders>
</default>
<namedCache name="ENTITIES">
<loaders passivation="false" shared="false" preload="true">
<loader class="org.infinispan.loaders.file.FileCacheStore"
fetchPersistentState="true" ignoreModifications="false"
purgerThreads="3" purgeSynchronously="true" purgeOnStartup="false">
<properties>
<property name="location" value="../etalab-data/store" />
</properties>
<singletonStore enabled="true" pushStateWhenCoordinator="true" pushStateTimeout="20000"/>
</loader>
</loaders>
</namedCache>
<namedCache name="ASSOCIATIONS">
<loaders passivation="true" shared="false" preload="true">
<loader class="org.infinispan.loaders.file.FileCacheStore"
fetchPersistentState="true" ignoreModifications="false"
purgerThreads="3" purgeSynchronously="true" purgeOnStartup="false">
<properties>
<property name="location" value="../etalab-data/store" />
</properties>
<singletonStore enabled="true" pushStateWhenCoordinator="true" pushStateTimeout="20000"/>
</loader>
</loaders>
</namedCache>
<namedCache name="IDENTIFIERS">
<loaders passivation="true" shared="false" preload="true">
<loader class="org.infinispan.loaders.file.FileCacheStore"
fetchPersistentState="true" ignoreModifications="false"
purgerThreads="3" purgeSynchronously="true" purgeOnStartup="false">
<properties>
<property name="location" value="../etalab-data/store" />
</properties>
<singletonStore enabled="true" pushStateWhenCoordinator="true" pushStateTimeout="20000"/>
</loader>
</loaders>
</namedCache>
</infinispan>
persistence.xmlCode:
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0"
xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
<persistence-unit name="etalab_enquete"
transaction-type="JTA">
<provider>org.hibernate.ogm.jpa.HibernateOgmPersistence</provider>
<jta-data-source>jdbc/etalab_enquete</jta-data-source>
<!-- Définition des classes qui seront persistantes -->
<class>fr.univtln.inf21.ejb.data.survey.Survey</class>
<class>fr.univtln.inf21.ejb.data.survey.Value</class>
<class>fr.univtln.inf21.ejb.data.survey.PersonCategory</class>
<class>fr.univtln.inf21.ejb.data.survey.SubjectCategory</class>
<class>fr.univtln.inf21.ejb.data.survey.PersonSubCategory</class>
<class>fr.univtln.inf21.ejb.data.survey.SubjectSubCategory</class>
<properties>
<property name="hibernate.transaction.manager_lookup_class"
value="org.hibernate.transaction.SunONETransactionManagerLookup" />
<property name="hibernate.ogm.infinispan.configuration_resourcename"
value="infinispan.xml" />
<property name="hibernate.search.default.directory_provider"
value="filesystem" />
<property name="hibernate.search.default.indexBase" value="../etalab-data/indexes" />
</properties>
</persistence-unit>
</persistence>
Folders ASSOCIATIONS, ENTITIES, IDENTIFIERS are correctly created but there is no data inside.
Configuration :
Infinispan version : 5.1.0BETA5
Hibernate version : 4.0.0FINAL
Hibernate OGM version : 3.0.0-SNAPSHOT
Glassfish 3.1.1
Thank you in advance ;)