// ensure only once
if (wrappedPersistenceUnitNames.contains(info.getPersistenceUnitName()))
return original;
wrappedPersistenceUnitNames.add(info.getPersistenceUnitName());
EntityManagerFactoryProxy wrapper = EntityManagerFactoryProxy.getWrapper(info.getPersistenceUnitName());
EntityManagerFactory proxy = wrapper.proxy(original, info.getPersistenceUnitName(), info, properties);
initPlugin(original);
LOGGER.debug("Returning container EntityManager proxy {} instead of EntityManager {}", proxy.getClass(), original);
return proxy;