jpa - How to use 2 PersistenceUnits in one Persistence.xml in a JavaEE application? - Stack Overflow

Опубликовано: 16 Март 2026
на канале: ResponseXAI
19
0

Have you tried explicitly declaring your persistence unit with

@PersistenceContext(unitName="Persistence")

instead of

@PersistenceContext(name="Persistence")

PersistenceContext doc


#declaring #with #@persistencecontext(unitname="persistence") #persistence #@persistencecontext(name="persistence")

https://stackoverflow.com/questions/1... https://stackoverflow.com/questions/1...