Skip to content

Instantly share code, notes, and snippets.

@vojkny
Created January 25, 2012 13:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vojkny/1676280 to your computer and use it in GitHub Desktop.
Save vojkny/1676280 to your computer and use it in GitHub Desktop.
persistence.xml
<?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="org.knyttl" transaction-type="RESOURCE_LOCAL">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<!--<provider>org.hibernate.ejb.HibernatePersistence</provider>-->
<class>org.knyttl.model.Event</class>
<class>org.knyttl.model.locales.EventLocale</class>
<class>org.knyttl.model.embedded.Schedule</class>
<class>org.knyttl.model.embedded.Tag</class>
<properties>
<property name="javax.persistence.target-database" value="PostgreSQL"/>
<property name="javax.persistence.logging.level" value="FINEST"/>
<property name="javax.persistence.jdbc.driver" value="org.postgresql.Driver"/>
<property name="javax.persistence.jdbc.url" value="jdbc:postgresql://localhost:5432/postgres"/>
<property name="javax.persistence.jdbc.user" value="postgres"/>
<property name="javax.persistence.jdbc.password" value="aA1bB2cC3"/>
<property name="eclipselink.ddl-generation" value="drop-and-create-tables" />
<property name="hibernate.connection.url" value="jdbc:postgresql://localhost/postgres"/>
<property name="hibernate.connection.username" value="postgres"/>
<property name="hibernate.connection.password" value="aA1bB2cC3"/>
<property name="hibernate.connection.driver_class" value="org.postgresql.Driver"/>
<property name="hibernate.show_sql" value="true"/>
</properties>
</persistence-unit>
</persistence>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment