Return to Snippet

Revision: 3850
at September 24, 2007 16:38 by thebugslayer


Updated Code
<?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">
    
    <persistence-unit name="default">
        <provider>org.hibernate.ejb.HibernatePersistence</provider>
        <properties>
            <!-- Auto detect annotation model classes -->
            <property name="hibernate.archive.autodetection" value="class"/>
            
            <!-- Datasource -->
            <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
            <property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver"/>
            <property name="hibernate.connection.username" value="root"/>
            <property name="hibernate.connection.password" value=""/>
            <property name="hibernate.connection.url" value="jdbc:mysql://localhost/myhibernatejpa_dev"/>
            
        </properties>
    </persistence-unit>
</persistence>

Revision: 3849
at September 23, 2007 20:47 by thebugslayer


Initial Code
<?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">
    
    <persistence-unit name="default">
        <provider>org.hibernate.ejb.HibernatePersistence</provider>
        <properties>
            <!-- Auto detect annotation model classes -->
            <property name="hibernate.archive.autodetection" value="class"/>
            
            <!-- Datasource -->
            <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
            <property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver"/>
            <property name="hibernate.connection.username" value="root"/>
            <property name="hibernate.connection.password" value=""/>
            <property name="hibernate.connection.url" value="jdbc:mysql://localhost/auction_dev"/>
            
        </properties>
    </persistence-unit>
</persistence>

Initial URL


Initial Description
this goes under src/main/resource/META-INF/persistence.xml

Initial Title
persistence.xml for Hibernate vendor

Initial Tags
java

Initial Language
Java