I'm using Infinispan, but when restart my Wildfly not keep the cache in file store
@Resource(lookup = "java:jboss/infinispan/container/server")
private EmbeddedCacheManager manager;
public String test() {
this.cache.put(UUID.randomUUID().toString(), new Date());
this.cache.put(UUID.randomUUID().toString(), new Date());
this.cache.put(UUID.randomUUID().toString(), new Date());
this.cache.put(UUID.randomUUID().toString(), new Date());
this.cache.put(UUID.randomUUID().toString(), new Date());
}
@PostConstruct
protected void init() {
this.manager.start();
this.cache = this.manager.getCache();
}
This is my standalone.xml
<cache-container name="server" default-cache="default" module="org.wildfly.clustering.web.infinispan">
<local-cache name="default">
<transaction mode="BATCH"/>
<file-store relative-to="jboss.server.data.dir" path="infinispan" passivation="false" purge="false"/>
</local-cache>
</cache-container>