A TomEE 1.5 persistence unit example using EclipseLink as the JPA provider. The data source is defined in a resources.xml file, an example of which can be found here... https://gist.github.com/4629327.
<?xml version="1.0" encoding="UTF-8"?> | |
<persistence version="2.0" | |
xmlns="http://java.sun.com/xml/ns/persistence" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"> | |
<persistence-unit name="CustomerDBSpringPU" transaction-type="JTA"> | |
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider> | |
<jta-data-source>jdbc/sample</jta-data-source> | |
<class>customerdb.Customer</class> | |
<class>customerdb.DiscountCode</class> | |
<exclude-unlisted-classes>false</exclude-unlisted-classes> | |
<properties/> | |
</persistence-unit> | |
</persistence> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment