0
我使用Infinispan的,但重新启动我的Wildfly时不能保持高速缓存中的文件存储Infinispan的跟不上缓存文件Wildfly 10
@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();
}
这是我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>
不能说我的头顶,但你不应该启动管理器,因为它已经开始注入。你可以尝试删除它吗? –