I\'m trying to get started with using Guice Persist and JPA, which recommends using configuration via persistence.xml. Coming from a native Hibernate background where confi
Depending on what you want to achieve and in what context (ApplicationServer vs CLI, CMT transactions vs EntityTransactions), it may be possible to use JPA without a persistence.xml
. I did this in a CLI Java application, where I had different databases with the same structure. For that I constructed the EntityManagerFactory
manually.
PS: The config file is there to make your life easier, so if you can, just use it.