Class KradEclipseLinkEntityManagerFactoryBean
java.lang.Object
org.kuali.rice.krad.data.jpa.KradEntityManagerFactoryBean
org.kuali.rice.krad.data.jpa.eclipselink.KradEclipseLinkEntityManagerFactoryBean
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanClassLoaderAware,org.springframework.beans.factory.BeanFactoryAware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.FactoryBean<javax.persistence.EntityManagerFactory>,org.springframework.beans.factory.InitializingBean,org.springframework.context.ResourceLoaderAware,org.springframework.context.weaving.LoadTimeWeaverAware,org.springframework.dao.support.PersistenceExceptionTranslator,org.springframework.orm.jpa.EntityManagerFactoryInfo
A KRAD-managed
EntityManagerFactory factory bean which can be used to configure an
EclipseLink persistence unit using JPA.
This class inherits the behavior from KradEntityManagerFactoryBean but adds the following:
- Detects if JTA is being used and, if so sets a JPA property value for
PersistenceUnitProperties.TARGET_SERVERtoJtaTransactionControllerwhich allows for EclipseLink integration with JTA. - Configures an EclipseLink "customizer" which allows for a configurable sequence management strategy
- Disables the shared cache (defined by
PersistenceUnitProperties.CACHE_SHARED_DEFAULTby default
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
-
Field Summary
Fields inherited from class org.kuali.rice.krad.data.jpa.KradEntityManagerFactoryBean
GLOBAL_JPA_PROPERTY_PREFIX, JPA_PROPERTY_PREFIXFields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE -
Constructor Summary
ConstructorsConstructorDescriptionCreates a KRAD-managedEntityManagerFactoryfactory bean. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidloadCustomJpaDefaults(Map<String, String> jpaProperties) Allows for loading of custom JPA defaults by subclasses, default implementation does nothing so subclasses need not call super.loadCustomJpaDefaults.Methods inherited from class org.kuali.rice.krad.data.jpa.KradEntityManagerFactoryBean
afterPropertiesSet, assemblePersistenceUnitPostProcessors, constructPersistenceUnitJpaPropertyPrefix, createInternalFactoryBean, createNativeEntityManager, createPersistenceUnitManager, destroy, getBeanClassLoader, getDataSource, getEntityManagerInterface, getInternalFactoryBean, getJpaDialect, getJpaPropertyMap, getManagedClassNames, getNativeEntityManagerFactory, getObject, getObjectType, getPersistenceProvider, getPersistenceUnitInfo, getPersistenceUnitManager, getPersistenceUnitName, getPersistenceUnitPostProcessors, isSingleton, loadGlobalJpaDefaults, loadPersistenceUnitJpaDefaults, setBeanClassLoader, setBeanFactory, setBeanName, setDataSource, setEntityManagerFactoryInterface, setEntityManagerInterface, setJpaDialect, setJpaProperties, setJpaPropertyMap, setJpaVendorAdapter, setJtaDataSource, setLoadTimeWeaver, setManagedClassNames, setMappingResources, setPackagesToScan, setPersistenceProvider, setPersistenceUnitName, setPersistenceUnitPostProcessors, setResourceLoader, translateExceptionIfPossible
-
Constructor Details
-
KradEclipseLinkEntityManagerFactoryBean
Creates a KRAD-managedEntityManagerFactoryfactory bean.- Throws:
Exception
-
-
Method Details
-
loadCustomJpaDefaults
Allows for loading of custom JPA defaults by subclasses, default implementation does nothing so subclasses need not call super.loadCustomJpaDefaults.Subclasses are free to override this method as they see fit. This method is executed after other defaults are loaded. A reference to the current Map of JPA properties is passed. Subclasses should take care if removing or overwriting any of the values which already exist in the given Map.
- Overrides:
loadCustomJpaDefaultsin classKradEntityManagerFactoryBean- Parameters:
jpaProperties- the current Map of JPA property defaults.
-