Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-6 Infinispan cache provider for Hibernate
  3. ISPN-458

Tweak for query-cache via hibernate.hbm.xml needed

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Won't Do
    • Icon: Critical Critical
    • None
    • 4.0.0.Final
    • Core

      In current implementation of hibernate-infinispan we can tune only entity and collection settings via hibernate.xml.cfg. But tuning in same way for queries needed too. In current version there are always the same cache region for all queries (look at org.hibernate.cache.infinispan.InfinispanRegionFactory.buildQueryResultsRegion) and it's incorrect.

      In org.hibernate.cache.infinispan.InfinispanRegionFactory.buildQueryResultsRegion
      Replace those lines:
      String cacheName = typeOverrides.get(QUERY_KEY).getCacheName();
      CacheAdapter cacheAdapter = CacheAdapterImpl.newInstance(manager.getCache(cacheName));
      To:
      Cache cache = getCache(regionName, QUERY_KEY, properties);
      CacheAdapter cacheAdapter = CacheAdapterImpl.newInstance(cache);

              rh-ee-galder Galder ZamarreƱo
              mrniko Niktia Koksharov (Inactive)
              Archiver:
              rhn-support-adongare Amol Dongare

                Created:
                Updated:
                Resolved:
                Archived: