Per-region level 2 cache configuration is ignored in JBoss EAP

Solution Verified - Updated -

Issue

  • A custom cache template is configured in the [standalone*|domain].xml

        <local-cache name="entity-region-config1">
            ...
        </local-cache>
    
  • One or more cache regions are mapped to this configuration via the persistence.xml

    <persistence-unit name="MyPersistenceUnit" transaction-type="JTA">
        ...
        <properties>
            ...
            <!--
                 property name format: hibernate.cache.infinispan.<prefix>.<region>.cfg
                 prefix defaults to:   <deployment>#<unitname>, overridden by the hibernate.cache.region_prefix property
                 region defaults to:   <package.entity>, overridden via @Cache(... region="region-name")
            -->
            <property name="hibernate.cache.infinispan.abcd.org.myco.MyEntity.cfg" value="entity-region-config1"/>
            ...
        </properties>
    </persistence-unit>
    
  • Properties specified in the cache template are ignored and configuration seems to come from the hibernate cache container's entity template.

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 7
    • 6
  • Hibernate
    • 5
    • 4
  • Infinispan
    • 8
    • 5

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