excludeUnlistedClassesValue,
properties,
classLoader);
try {
Class clazz = classLoader.loadClass(persistenceProviderClassName);
PersistenceProvider persistenceProvider = (PersistenceProvider) clazz.newInstance();
entityManagerFactory = persistenceProvider.createContainerEntityManagerFactory(persistenceUnitInfo, properties);
} catch (ClassNotFoundException e) {
persistenceUnitInfo.destroy();
throw new PersistenceException("Could not locate PersistenceProvider class: " + persistenceProviderClassName + " in classloader " + classLoader, e);
} catch (InstantiationException e) {
persistenceUnitInfo.destroy();