I know that with the instruction:
Persistence.createEntityManagerFactory("persistence-unit-name");
The JPA persistence mechanism reads the "persistence.xml" file, looks for the persistence unit called "persistence-unit-name", and constructs the EntityManagerFactory based on it.
My question is, how can I force JPA to take a file different from "persistence.xml"?? for example, "persistence-test.xml".
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…