if (pu.getTransactionType() == PersistenceUnitTransactionType.RESOURCE_LOCAL) {
throw MESSAGES.cannotInjectResourceLocalEntityManager(unitName);
}
String scopedPuName = pu.getScopedPersistenceUnitName();
ServiceName puServiceName = getPuServiceName(scopedPuName);
return new PersistenceContextInjectionSource(type, properties, puServiceName, deploymentUnit, scopedPuName, EntityManager.class.getName(), SFSBXPCMap.getXpcMap(deploymentUnit), pu);
}