JPA persistence binding

Please review.
Included are libs for PostgreSQL, Apache Derby and MySQL.
Tested on PostgreSQL and Apache Derby. Working OK on my production system.

This is the one that is used in the binding by JPA.
The other one in META-INF is only used for the build process.
JPA needs to "enhance" class files with additional information. For that it requires a persistence.xml file. However I wasn't able to give it the file in resources, so I copied the one.
They are synched but must be done manually for now.



> Am 05.11.2014 um 11:29 schrieb Thomas Eichstädt-Engelen <notifications@github.com>:
> 
> In bundles/persistence/org.openhab.persistence.jpa/src/main/resources/META-INF/persistence.xml:
> 
> > +    <persistence-unit name="default_test" transaction-type="RESOURCE_LOCAL">
> > +        <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
> > +        <non-jta-data-source/>
> > +        <class>org.openhab.persistence.jpa.internal.model.JpaPersistentItem</class>
> > +        <exclude-unlisted-classes>true</exclude-unlisted-classes>
> > +        <properties>
> > +            <property name="javax.persistence.jdbc.url" value="jdbc:derby:data;create=true"/>
> > +            <property name="javax.persistence.jdbc.driver" value="org.apache.derby.jdbc.EmbeddedDriver"/>
> > +            <property name="javax.persistence.jdbc.user" value="APP"/>
> > +            <property name="javax.persistence.jdbc.password" value="APP"/>
> > +            <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(SchemaAction='drop,add')"/>
> > +            <property name="openjpa.Log" value="DefaultLevel=WARN, Tool=INFO"/>
> > +        </properties>
> > +    </persistence-unit>
> > +
> > +</persistence>
> 
> what is this persistence.xml is for? How is it related to the one in the META-INF directory? Are they synched somehow?
> 
> —
> Reply to this email directly or view it on GitHub.
>