getApplicationScopedPersistenceContext(); // we create this on initialisation so that we own the EMF reference
// otherwise Spring will close it after the transaction finishes
}
public PersistenceContext getApplicationScopedPersistenceContext() {
return new JpaPersistenceContext(
getApplicationScopedEntityManager(),
isJTA,
pessimisticLocking,
(TransactionManager) this.env.get(EnvironmentName.TRANSACTION_MANAGER));
}