-
-
Save murilomenezescosta/b4d7047241c8ebc48013d8552f19c056 to your computer and use it in GitHub Desktop.
persistence.xml for eclipse link and mongodb.
This file contains hidden or 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
| <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_2_0.xsd" | |
| version="2.0"> | |
| <persistence-unit name="pu" > | |
| <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider> | |
| <exclude-unlisted-classes>false</exclude-unlisted-classes> | |
| <properties> | |
| <property name="javax.persistence.jdbc.driver" value="org.h2.Driver" /> | |
| <property name="javax.persistence.jdbc.url" value="jdbc:h2:./db/testdb" /> | |
| <property name="javax.persistence.jdbc.user" value="sa" /> | |
| <property name="javax.persistence.jdbc.password" value="sa" /> | |
| <property name="eclipselink.ddl-generation" value="drop-and-create-tables" /> | |
| <property name="eclipselink.ddl-generation.output-mode" value="both" /> | |
| <property name="eclipselink.logging.level" value="FINE"/> | |
| <property name="eclipselink.logging.parameters" value="true"/> | |
| </properties> | |
| </persistence-unit> | |
| <persistence-unit name="mongo" transaction-type="RESOURCE_LOCAL"> | |
| <exclude-unlisted-classes>false</exclude-unlisted-classes> | |
| <properties> | |
| <property name="eclipselink.target-database" value="org.eclipse.persistence.nosql.adapters.mongo.MongoPlatform"/> | |
| <property name="eclipselink.nosql.connection-spec" value="org.eclipse.persistence.nosql.adapters.mongo.MongoConnectionSpec"/> | |
| <property name="eclipselink.nosql.property.mongo.port" value="27017"/> | |
| <property name="eclipselink.nosql.property.mongo.host" value="localhost"/> | |
| <property name="eclipselink.nosql.property.mongo.db" value="test"/> | |
| <property name="eclipselink.logging.level" value="FINEST"/> | |
| </properties> | |
| </persistence-unit> | |
| </persistence> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment