Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-9967

hibernate/cache-commons should be independent of Hibernate orm classes

    XMLWordPrintable

Details

    • Bug
    • Resolution: Obsolete
    • Minor
    • None
    • 9.2.4.Final
    • Hibernate Cache
    • None

    Description

      hibernate/cache-commons contains shared code for use with Hibernate ORM 5.1 + 5.3, however, hibernate/cache-commons cannot be shared because it must have either ORM 5.1 or 5.3 in its classpath but not both.

      Hibernate orm dependencies are shown below from current Infinispan master branch:

      grep -ri org.hibernate * --include=*.java
      access/NonTxInvalidationCacheAccessDelegate.java:import org.hibernate.cache.CacheException;
      access/NonTxInvalidationCacheAccessDelegate.java:import org.hibernate.cache.spi.access.SoftLock;
      access/TxInvalidationCacheAccessDelegate.java:import org.hibernate.cache.CacheException;
      access/TxInvalidationCacheAccessDelegate.java:import org.hibernate.cache.spi.access.SoftLock;
      access/NonStrictAccessDelegate.java:import org.hibernate.cache.CacheException;
      access/NonStrictAccessDelegate.java:import org.hibernate.cache.spi.access.SoftLock;
      access/NonStrictAccessDelegate.java:import org.hibernate.cache.spi.entry.CacheEntry;
      access/AccessDelegate.java:import org.hibernate.cache.CacheException;
      access/AccessDelegate.java:import org.hibernate.cache.spi.access.SoftLock;
      access/AccessDelegate.java: *

      Unknown macro: {@link org.hibernate.cache.spi.access.EntityRegionAccessStrategy}

      access/AccessDelegate.java: * and

      Unknown macro: {@link org.hibernate.cache.spi.access.CollectionRegionAccessStrategy}

      implementations.
      access/AccessDelegate.java: * @throws org.hibernate.cache.CacheException Propogated from underlying

      Unknown macro: {@link org.hibernate.cache.spi.Region}


      access/AccessDelegate.java: * @throws org.hibernate.cache.CacheException Propogated from underlying

      access/AccessDelegate.java: * @throws CacheException Propagated from underlying

      Unknown macro: {@link org.hibernate.cache.spi.Region}


      access/AccessDelegate.java: * @throws CacheException Propagated from underlying

      access/TombstoneAccessDelegate.java:import org.hibernate.cache.CacheException;
      access/TombstoneAccessDelegate.java:import org.hibernate.cache.spi.access.SoftLock;
      access/PutFromLoadValidator.java:import org.hibernate.engine.spi.SessionImplementor;
      access/PutFromLoadValidator.java:import org.hibernate.cache.spi.RegionFactory;
      access/InvalidationCacheAccessDelegate.java:import org.hibernate.cache.CacheException;
      access/SessionAccess.java:import org.hibernate.engine.transaction.spi.IsolationDelegate;
      DefaultCacheManagerProvider.java:import org.hibernate.boot.registry.classloading.spi.ClassLoaderService;
      DefaultCacheManagerProvider.java:import org.hibernate.internal.util.config.ConfigurationHelper;
      DefaultCacheManagerProvider.java:import org.hibernate.service.ServiceRegistry;
      JndiCacheManagerProvider.java:import org.hibernate.cfg.Environment;
      JndiCacheManagerProvider.java:import org.hibernate.internal.util.jndi.JndiHelper;
      util/InvocationAfterCompletion.java:import org.hibernate.HibernateException;
      util/InvocationAfterCompletion.java:import org.hibernate.jdbc.WorkExecutor;
      util/InvocationAfterCompletion.java:import org.hibernate.jdbc.WorkExecutorVisitable;
      util/InfinispanMessageLogger.java:import org.hibernate.cache.CacheException;
      util/VersionedEntry.java:import org.hibernate.cache.spi.entry.CacheEntry;
      util/VersionedEntry.java:import org.hibernate.cache.spi.entry.StructuredCacheEntry;

      One solution could be to eliminate the hibernate/cache-commons code by inlining it into the respective hibernate/cache-v51 + cache-v52 + cache-v53 folders.

      Or removing the Hibernate ORM references from hibernate/cache-commons.

      I made this a minor issue for now, because it doesn't have to be solved yet.

      Attachments

        Activity

          People

            rh-ee-galder Galder ZamarreƱo
            smarlow1@redhat.com Scott Marlow
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: