Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-19971

[GSS](7.3.z) Custom Infinispan cache regions fail when using legacy (non-JPA) Hibernate configuration

    XMLWordPrintable

Details

    • Bug
    • Resolution: Not a Bug
    • Major
    • None
    • 7.2.0.GA, 7.2.8.GA, 7.3.2.GA
    • JPA/Hibernate
    • None

    Description

      A custom cache template is defined in the "hibernate" cache container in the standalone.xml

                      <local-cache name="entities.custom-cache">
                          <transaction mode="NONE"/>
                          <object-memory size="10"/>
                      </local-cache>
      

      In the legacy hibernate.cfg.xml this is associated with a named cache region.

                      <property name="hibernate.cache.region_prefix">entities</property>
                      <property name="hibernate.cache.infinispan.entities.custom-cache.cfg">entities.custom-cache</property>
                      <property name="hibernate.cache.use_second_level_cache">true</property>
      

      The cache region is then referenced in an entity annotation:

      @Entity
      @Cache(usage=CacheConcurrencyStrategy.READ_WRITE, region="custom-cache")
      public class Employee {
          ...
      }
      

      At deployment, an exception is logged:

      ... HHH025007: Custom cache configuration 'entities.custom-cache' was requested for region entities.custom-cache but it was not found - using configuration by type (entity).
      

      This same approach (but using transactional caching) worked in JBoss EAP 7.1.

      Attachments

        Issue Links

          Activity

            People

              smarlow1@redhat.com Scott Marlow
              rhn-support-sfikes Stephen Fikes (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: