Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Configuracion del archivo persistence.xml
<?xml version="1.0" encoding="UTF-8"?>
<persistence 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_1_0.xsd"
version="1.0">
<!-- Tomcat + Hypersonic -->
<persistence-unit name="default">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<non-jta-data-source>java:comp/env/jdbc/EmpresaDS</non-jta-data-source>
<class>org.openxava.session.GalleryImage</class>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
</properties>
</persistence-unit>
<!-- JUnit Hypersonic -->
<persistence-unit name="junit">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<properties>
<property name="connection.driver_class" value="com.mysql.jdbc.Driver" />
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
<property name="hibernate.connection.url" value="jdbc:mysql://localhost:3306/empresa"/>
<property name="hibernate.connection.username" value="myuser"/>
<property name="hibernate.connection.password" value="mypass"/>
</properties>
</persistence-unit>
</persistence>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.