/** * Set the PersistenceUnitPostProcessors to be applied to the * PersistenceUnitInfo used for creating this EntityManagerFactory. * <p>Such post-processors can, for example, register further entity * classes and jar files, in addition to the metadata read from * {@code persistence.xml}. * <p><b>NOTE: Only applied if no external PersistenceUnitManager specified.</b> * @see #setPersistenceUnitManager */ public void setPersistenceUnitPostProcessors(PersistenceUnitPostProcessor... postProcessors) { this.internalPersistenceUnitManager.setPersistenceUnitPostProcessors(postProcessors); }
/** * Set the PersistenceUnitPostProcessors to be applied to the * PersistenceUnitInfo used for creating this EntityManagerFactory. * <p>Such post-processors can, for example, register further entity * classes and jar files, in addition to the metadata read from * {@code persistence.xml}. * <p><b>NOTE: Only applied if no external PersistenceUnitManager specified.</b> * @see #setPersistenceUnitManager */ public void setPersistenceUnitPostProcessors(PersistenceUnitPostProcessor... postProcessors) { this.internalPersistenceUnitManager.setPersistenceUnitPostProcessors(postProcessors); }
/** * Set the PersistenceUnitPostProcessors to be applied to the * PersistenceUnitInfo used for creating this EntityManagerFactory. * <p>Such post-processors can, for example, register further entity * classes and jar files, in addition to the metadata read from * {@code persistence.xml}. * <p><b>NOTE: Only applied if no external PersistenceUnitManager specified.</b> * @see #setPersistenceUnitManager */ public void setPersistenceUnitPostProcessors(PersistenceUnitPostProcessor... postProcessors) { this.internalPersistenceUnitManager.setPersistenceUnitPostProcessors(postProcessors); }
/** * {@inheritDoc} */ @Override public void afterPropertiesSet() throws PersistenceException { if (persistenceUnitManager.getDefaultJtaDataSource() != null && persistenceUnitManager.getDefaultDataSource() != null) { throw new IllegalStateException(getPersistenceUnitName() + ": " + getClass().getSimpleName() + " was configured with both a JTA and Non-JTA " + " datasource. Must configure one or the other, but not both."); } this.internalFactoryBean.setJpaPropertyMap(defaultAndMergeJpaProperties()); persistenceUnitManager.setPersistenceUnitPostProcessors(assemblePersistenceUnitPostProcessors()); persistenceUnitManager.afterPropertiesSet(); internalFactoryBean.afterPropertiesSet(); }
new JPAPersistenceUnitPostProcessor( ) }; pum.setPersistenceUnitPostProcessors( postProcessors );