Skip to content

Instantly share code, notes, and snippets.

@sebbaum
Created September 19, 2015 18:53
Show Gist options
  • Save sebbaum/7a2ff7c53ab25d208db7 to your computer and use it in GitHub Desktop.
Save sebbaum/7a2ff7c53ab25d208db7 to your computer and use it in GitHub Desktop.
JPA persistence.xml for wildfly
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
<!--<persistence-unit name="moments" transaction-type="JTA">-->
<!--<jta-data-source>java:jboss/datasources/coffeeCounter-in-memoryDS</jta-data-source>-->
<!--<class>de.sebbaum.coffee.entity.Coffee</class>-->
<!--<exclude-unlisted-classes>true</exclude-unlisted-classes>-->
<!--<properties>-->
<!--<property name="hibernate.hbm2ddl.auto" value="create" />-->
<!--<property name="dialect" value="org.hibernate.dialect.H2Dialect" />-->
<!--<property name="hibernate.show_sql" value="true" />-->
<!--<property name="javax.persistence.sql-load-script-source" value="basicImport.sql"/>-->
<!--</properties>-->
<!--</persistence-unit>-->
<persistence-unit name="moments" transaction-type="JTA">
<jta-data-source>java:jboss/datasources/coffeeCounterDS</jta-data-source>
<class>de.sebbaum.coffee.entity.Coffee</class>
<exclude-unlisted-classes>true</exclude-unlisted-classes>
<properties>
<property name="javax.persistence.schema-generation.database.action" value="drop-and-create"/>
<property name="javax.persistence.sql-load-script-source" value="basicImport.sql"/>
</properties>
</persistence-unit>
</persistence>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment