==========================
== Timoteo Ponce's blog ==
==========================

Create a JPA EntityManager programmatically

jpa entityManager hibernate java
I'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?

  • Solution link: http://docs.jboss.org/hibernate/stable/entitymanager/reference/en/html/configuration.html