Session attribute lost issue with the ATTRIBUTE replication-granularity + non-BATCH cache in a failover scenario in JBoss EAP 7

Solution Unverified - Updated -

Issue

  • Session attributes lost issue happens with the configuration using the ATTRIBUTE replication-granularity + non-BATCH cache in a failover scenario in JBoss EAP 7.
  • A newly created session attribute after failover is lost in the subsequent session.getAttribute() invocations during the same request processing.
  • This issue happens When I have a web application which has the "ATTRIBUTE" replication granularity in jboss-web.xml:

    <?xml version="1.0" encoding="UTF-8"?>
    <jboss-web
            version="7.1"
            xmlns="http://www.jboss.com/xml/ns/javaee"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/schema/jbossas/jboss-web_7_1.xsd">
        <replication-config>
            <replication-granularity>ATTRIBUTE</replication-granularity>
        </replication-config>
    </jboss-web>
    

    and <transaction mode="BATCH"/> is disabled for the "web" cache in infinispan subsystem like this knowledge article:

        <subsystem xmlns="urn:jboss:domain:infinispan:7.0">
            ...
            <cache-container name="web" default-cache="dist" module="org.wildfly.clustering.web.infinispan">
                <transport lock-timeout="60000"/>
                <distributed-cache name="dist">
                    <!-- <locking isolation="REPEATABLE_READ"/> -->
                    <!-- <transaction mode="BATCH"/> -->
                    <file-store/>
                </distributed-cache>
            </cache-container>
            ...
        </subsystem>
    

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 7.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content