factory = Persistence.createEntityManagerFactory(
PERSISTENCE_UNIT);
}
if (factory == null) {
throw new PersistenceException(Convert.toString(
"A EntityManagerFactory para a unidade de persistencia",
" '", PERSISTENCE_UNIT, "' e nula."));
}
} catch (Exception e) {
throw new PersistenceException(Convert.toString(
"Erro ao obter unidade de persistencia JPA: ",
PERSISTENCE_UNIT), e);
}
}