Class JCachePersistenceUnitPostProcessor

java.lang.Object
org.broadleafcommerce.common.extensibility.jpa.JCachePersistenceUnitPostProcessor
All Implemented Interfaces:
org.springframework.orm.jpa.persistenceunit.PersistenceUnitPostProcessor

public class JCachePersistenceUnitPostProcessor extends Object implements org.springframework.orm.jpa.persistenceunit.PersistenceUnitPostProcessor
Persistence unit post processor for dynamically modifying the persistence unit.

jcache.disable.cache - default: false, disables hibernate L2 and query cache if true hibernate.javax.cache.provider - default: null, overrides the cache provider defined in the persistence.xml hibernate.cache.region.factory_class - default: null, overrides the cache region factory defined in the persistence.xml

uriProvider - A configurable provider class that returns the URI to be used for caching overrideCacheProperties - A map used to set any additional properties on the persistence unit, presumeably related to caching

Author:
Jay Aisenbrey (cja769)
  • Field Details

    • disableCache

      @Value("${jcache.disable.cache:false}") protected Boolean disableCache
    • cacheProvider

      @Value("${hibernate.javax.cache.provider:#{null}}") protected String cacheProvider
    • cacheRegionFactory

      @Value("${hibernate.cache.region.factory_class:#{null}}") protected String cacheRegionFactory
    • uriProvider

      @Autowired protected JCacheUriProvider uriProvider
    • overrideCacheProperties

      @Autowired(required=false) @Qualifier("blJCachePUPostProcessorOverrideProperties") protected Map<String,String> overrideCacheProperties
  • Constructor Details

    • JCachePersistenceUnitPostProcessor

      public JCachePersistenceUnitPostProcessor()
  • Method Details

    • postProcessPersistenceUnitInfo

      public void postProcessPersistenceUnitInfo(org.springframework.orm.jpa.persistenceunit.MutablePersistenceUnitInfo pui)
      Specified by:
      postProcessPersistenceUnitInfo in interface org.springframework.orm.jpa.persistenceunit.PersistenceUnitPostProcessor