[infinispan-issues] [JBoss JIRA] (ISPN-9967) hibernate/cache-commons should be independent of Hibernate orm classes

Scott Marlow (Jira) issues at jboss.org
Tue Feb 12 15:37:00 EST 2019


Scott Marlow created ISPN-9967:
----------------------------------

             Summary: hibernate/cache-commons should be independent of Hibernate orm classes
                 Key: ISPN-9967
                 URL: https://issues.jboss.org/browse/ISPN-9967
             Project: Infinispan
          Issue Type: Bug
          Components: Hibernate Cache
    Affects Versions: 9.2.4.Final
            Reporter: Scott Marlow


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:
{quote}
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: * {@link org.hibernate.cache.spi.access.EntityRegionAccessStrategy}
access/AccessDelegate.java: * and {@link org.hibernate.cache.spi.access.CollectionRegionAccessStrategy} implementations.
access/AccessDelegate.java:      * @throws org.hibernate.cache.CacheException Propogated from underlying {@link org.hibernate.cache.spi.Region}
access/AccessDelegate.java:      * @throws org.hibernate.cache.CacheException Propogated from underlying {@link org.hibernate.cache.spi.Region}
access/AccessDelegate.java:      * @throws CacheException Propagated from underlying {@link org.hibernate.cache.spi.Region}
access/AccessDelegate.java:      * @throws CacheException Propagated from underlying {@link org.hibernate.cache.spi.Region}
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;
{quote}

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.



--
This message was sent by Atlassian Jira
(v7.12.1#712002)


More information about the infinispan-issues mailing list