Using CacheConcurrencyStrategy.NONSTRICT_READ_WRITE or CacheConcurrencyStrategy.READ_WRITE with Hibernate/Infinispan in EAP 7

Solution Unverified - Updated -

Issue

  • Configure READ_WRITE
  • Configure NONSTRICT_READ_WRITE
  • Exception when using NONSTRICT_READ_WRITE

    java.lang.IllegalArgumentException: Currently transactional caches are not supported.
        at org.hibernate.cache.infinispan.access.NonStrictAccessDelegate.<init>(NonStrictAccessDelegate.java:54)
        at org.hibernate.cache.infinispan.impl.BaseTransactionalDataRegion.createAccessDelegate(BaseTransactionalDataRegion.java:123)
        at org.hibernate.cache.infinispan.entity.EntityRegionImpl.buildAccessStrategy(EntityRegionImpl.java:50)
        at org.hibernate.internal.SessionFactoryImpl.determineEntityRegionAccessStrategy(SessionFactoryImpl.java:624)
        at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:332)
        at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:444)
        at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:879)
    ...
    
  • Logged WARN message when using READ_WRITE

    ... WARN  [org.hibernate.cache.infinispan.impl.BaseRegion] ... Requesting READ_WRITE cache concurrency strategy but the cache was configured as transactional.
    

Environment

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

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