protected EntityManagerFactory createEntityManagerFactory() {
LocalEntityManagerFactoryBean emfBean = new LocalEntityManagerFactoryBean();
emfBean.setPersistenceUnitName(persistenceUnit);
emfBean.setJpaPropertyMap(getEntityManagerProperties());
emfBean.afterPropertiesSet();
return emfBean.getObject();
}
protected PlatformTransactionManager createTransactionManager() {
JpaTransactionManager tm = new JpaTransactionManager(getEntityManagerFactory());