0
我在JBoss中7中添加緩存通過CLI:到JBoss EAP 7.0 standalone.xml設置Infinispan的緩存設置不反映在應用
/subsystem=infinispan/cache-container=sample:add
/subsystem=infinispan/cache-container=sample/replicated-cache=account:add(mode=ASYNC)
/subsystem=infinispan/cache-container=sample/replicated-cache=account/component=transaction:write-attribute(name=mode,value=BATCH)
/subsystem=infinispan/cache-container=sample/replicated-cache=account/component=locking:write-attribute(name=isolation, value=REPEATABLE_READ)
看它體現在standalone.xml的Infinispan的子系統:
<cache-container name="sample">
<replicated-cache name="account" mode="ASYNC">
<locking isolation="REPEATABLE_READ"/>
<transaction mode="BATCH"/>
</replicated-cache>
</cache-container>
看它反映在JBoss的控制檯:
但是,當在應用程序中使用時,找到緩存容器,但緩存不是。相反,當cacheManager#getCache
被設置爲不同的設置時,它被延遲創建。
模式設置被複制,但什麼是發現是本地的。其他設置如交易也不同。我錯過了什麼?
嗯,你有沒有試着用最新的JBoss/Wildfly應用服務器,那會是Wildfly 10 –
我很想,但我的組織現在禁止。 –
如果我是你,我會試試至少用Wildfly 10或11,看看它是否按預期工作。如果確實如此,那麼您的組織有升級的理由。如果沒有,可能還有其他東西丟失。 –