7 Replies Latest reply on Apr 23, 2018 10:08 AM by Vamshi Krishna

    [SOLVED] Wildfly 12 - Does HttpSession replication work only if it is configured with transaction?

    Daniel Fb Newbie

      Hi,

       

      I'm trying to use session replication but without lock contention.

      So I set up the infinispan "web" cache-container like this:

       

      <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>
      
      

       

      But the session is not replicating across the cluster.

      It replicates only if I use mode="BATCH" and default transaction locking (PESSIMISTIC). But with this strategy does not perform well with long requests (about 2~3 seconds) and a lot of concurrent access.

      (one request locks others requests because the first one owns the session lock)

       

      Is there any way to replicate the session across the cluster without using transaction and consequently without session lock?

       

      Thanks!