Created
April 14, 2015 23:04
-
-
Save kevinhooke/5daf864a0f9a58bd2c96 to your computer and use it in GitHub Desktop.
JPA persistence.xml with JTA and Weblogic transaction manager
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<persistence xmlns="http://java.sun.com/xml/ns/persistence" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0" | |
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"> | |
<persistence-unit name="SimplePU" transaction-type="JTA"> | |
<provider>org.hibernate.ejb.HibernatePersistence</provider> | |
<jta-data-source>jdbc/datasourcename</jta-data-source> | |
<properties> | |
<property name="hibernate.hbm2ddl.auto" value="create" /> <!-- remove this if not creating tables at init --> | |
<property name="hibernate.show_sql" value="true" /> | |
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5InnoDBDialect" /> | |
<property name="hibernate.transaction.manager_lookup_class" | |
value="org.hibernate.transaction.WeblogicTransactionManagerLookup" /> | |
</properties> | |
</persistence-unit> | |
</persistence> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment