unitInfo.setPersistenceProviderClassName(persistenceProviderClassName);
final long start = System.nanoTime();
try {
Class clazz = classLoader.loadClass(persistenceProviderClassName);
PersistenceProvider persistenceProvider = (PersistenceProvider) clazz.newInstance();
// Create entity manager factory
EntityManagerFactory emf = persistenceProvider.createContainerEntityManagerFactory(unitInfo, new HashMap());
return emf;
} finally {
final long time = TimeUnit.MILLISECONDS.convert(System.nanoTime() - start, TimeUnit.NANOSECONDS);
logger.info("assembler.buildingPersistenceUnit", unitInfo.getPersistenceUnitName(), unitInfo.getPersistenceProviderClassName(), time+"");