Answer the question
In order to leave comments, you need to log in
How to create a db connection through persistence.xml?
One way to connect a program to a database is using the resources/META-INF/persistence.xml file.
It needs to be written
<persistence>
<persistence-unit name="MyPU">
<jta-data-source>MyDataSource</jta-data-source>
...
</persistence-unit>
</persistence>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question