-
-
Save aeberhardo/c073096a688b557aa094 to your computer and use it in GitHub Desktop.
Wildfly Datasource and JPA Descriptor (persistence.xml)
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="primary"> | |
<jta-data-source>java:jboss/datasources/PeopleDS</jta-data-source> | |
<properties> | |
<property name="hibernate.hbm2ddl.auto" value="create-drop"/> | |
<property name="hibernate.show_sql" value="false"/> | |
<property name="hibernate.transaction.flush_before_completion" value="true"/> | |
</properties> | |
</persistence-unit> | |
</persistence> |
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
<datasources xmlns="http://www.jboss.org/ironjacamar/schema" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://www.jboss.org/ironjacamar/schema http://docs.jboss.org/ironjacamar/schema/datasources_1_0.xsd"> | |
<!-- The datasource is bound into JNDI at this location. We reference | |
this in META-INF/persistence.xml --> | |
<datasource jndi-name="java:jboss/datasources/PeopleDS" | |
pool-name="people-web" enabled="true" | |
use-java-context="true"> | |
<connection-url>jdbc:h2:mem:people-web;DB_CLOSE_ON_EXIT=FALSE</connection-url> | |
<driver>h2</driver> | |
<security> | |
<user-name>sa</user-name> | |
<password>sa</password> | |
</security> | |
</datasource> | |
</datasources> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment