@Override
    public FactoryBean<EntityManagerFactory> newEntityManagerFactoryBean(final JpaConfigurationContext config,
                                                                         final AbstractJpaProperties jpaProperties) {
        val bean = JpaBeans.newEntityManagerFactoryBean(config);

        val map = new HashMap<String, Object>();
        map.put(PersistenceUnitProperties.WEAVING, Boolean.FALSE.toString());
        map.put(PersistenceUnitProperties.DDL_GENERATION, jpaProperties.getDdlAuto());
        map.put(PersistenceUnitProperties.BATCH_WRITING_SIZE, jpaProperties.getBatchSize());
        map.put(PersistenceUnitProperties.BATCH_WRITING, BatchWriting.JDBC);
        map.put(PersistenceUnitProperties.LOGGING_LEVEL, SessionLog.FINE_LABEL);
        bean.getJpaPropertyMap().putAll(map);
        bean.afterPropertiesSet();
        return bean;
    }
This is {@link CasEclipseLinkJpaBeanFactory}.

@author Misagh Moayyed
@since 6.2.0
support/cas-server-support-jpa-eclipselink/src/main/java/org/apereo/cas/eclipselink/CasEclipseLinkJpaBeanFactory.java