Skip to content

Instantly share code, notes, and snippets.

@garystafford
Created October 27, 2013 03:17
Show Gist options
  • Save garystafford/7177611 to your computer and use it in GitHub Desktop.
Save garystafford/7177611 to your computer and use it in GitHub Desktop.
Persistence Unit (persistence.xml) from my blog post, 'Java RESTful Web Services Using MySQL Server, EclipseLink, and Jersey': http://wp.me/p1RD28-Cf
<?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="MySQLDemoServicePU" transaction-type="JTA">
<jta-data-source>jdbc/mysql_sakila</jta-data-source>
<class>com.mysql.entities.Actor</class>
<class>com.mysql.entities.ActorInfo</class>
<class>com.mysql.entities.Film</class>
<class>com.mysql.entities.FilmActor</class>
<class>com.mysql.entities.Language</class>
<exclude-unlisted-classes>true</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