return newInstance(emf, template);
}
public static JpaTemplateTransactionStrategy newInstance(EntityManagerFactory emf, JpaTemplate template) {
JpaTransactionManager transactionManager = new JpaTransactionManager(emf);
transactionManager.afterPropertiesSet();
TransactionTemplate tranasctionTemplate = new TransactionTemplate(transactionManager);
tranasctionTemplate.afterPropertiesSet();
return new JpaTemplateTransactionStrategy(template, tranasctionTemplate);