Create JPA EntityManager without persistence.xml configuration file

Is there a way to initialize the EntityManager without a persistence unit defined? You should define at least one persistence unit in the persistence.xml deployment descriptor. Can you give all the required properties to create an Entitymanager? The name attribute is required. The other attributes and elements are optional. (JPA specification). So this should be … Read more