2 Replies Latest reply on Apr 19, 2018 6:07 AM by Radoslav Husar

    Wildfly 12 - How to configure a Infinispan replicated SYNC cache?

    dbdbdb dbdbdb Newbie

      In previous versions I was able to configure the "mode" os the cache, selecting between SYNC or ASYNC.

      How can I configure this property in Wildfly 12? Looks like this attribute is no longer available.

       

      thanks!

        • 1. Re: Wildfly 12 - How to configure a Infinispan replicated SYNC cache?
          dbdbdb dbdbdb Newbie

          It's already SYNC by default:

          WildFly 12.0 Model Reference

           

            • mode Sets the clustered cache mode, ASYNC for asynchronous operation, or SYNC for synchronous operation.

           

          Deprecated Since 6.0.0
          Deprecated. This attribute will be ignored. All cache modes will be treated as SYNC. To perform asynchronous cache operations, use Infinispan's asynchronous cache API.

           

          I'm trying to get rid of lock contention (based from here: HTTP Session Replication - org.infinispan.util.concurrent.TimeoutException )

           

          But with this configuration:

                          <cache-container name="web" default-cache="repl" module="org.wildfly.clustering.web.infinispan">

                              <transport lock-timeout="60000"/>

                              <replicated-cache name="repl">

                                  <locking isolation="READ_COMMITTED"/>

                                  <transaction locking="OPTIMISTIC" mode="NONE"/>

                                  <file-store/>

                              </replicated-cache>

                          </cache-container>

           

          the session is not replication to cluster-wide fast enough to other nodes access the value, causing cache misses when the pages redirect from login to the logged page.

           

          how can I reduce the lock contention of http session but write to cache cluster-wide when invoking request.getSession().setAttribute(...)?

           

          thanks

          • 2. Re: Wildfly 12 - How to configure a Infinispan replicated SYNC cache?
            Radoslav Husar Master

            Hi Dbdbdb, the mode attribute is gone. The caches are SYNC by default.