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

public class KradEclipseLinkEntityManagerFactoryBean extends KradEntityManagerFactoryBean
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_SERVER to JtaTransactionController which 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_DEFAULT by default
Author:
Kuali Rice Team (rice.collab@kuali.org)
  • Constructor Details

    • KradEclipseLinkEntityManagerFactoryBean

      public KradEclipseLinkEntityManagerFactoryBean() throws Exception
      Creates a KRAD-managed EntityManagerFactory factory bean.
      Throws:
      Exception
  • Method Details

    • loadCustomJpaDefaults

      protected void loadCustomJpaDefaults(Map<String,String> jpaProperties)
      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:
      loadCustomJpaDefaults in class KradEntityManagerFactoryBean
      Parameters:
      jpaProperties - the current Map of JPA property defaults.