Create a JPA EntityManager programmatically
jpa entityManager hibernate javaI've been using this kind of PersistenceUnit creation for some unit tests, because they had to run along with some integration tests, and because of that the persistence.xml files were messing between them.
So, how to create an EntityManager programmatically?
So, how to create an EntityManager programmatically?
- Solution link: http://docs.jboss.org/hibernate/stable/entitymanager/reference/en/html/configuration.html