Use eclipselink.nosql.property
to set NoSQL-specific connection properties. Append the NoSQL-specific property name to this parameter.
Values
Table 5-70 describes this persistence property's values.
Usage
Examples
Example 5-68 Using nosql.property in persistence.xml
<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 persistence_2_0.xsd" version="2.0"> <persistence-unit name="acme" transaction-type="RESOURCE_LOCAL"> <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider> <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, 27017"/> <property name="eclipselink.nosql.property.mongo.host" value="host1, host2"/> <property name="eclipselink.nosql.property.mongo.db" value="acme"/> </properties> </persistence-unit> </persistence>
See Also
For more information, see:
"Using Non-SQL Databases" in Understanding EclipseLink
NoSQL Persistence Units
http://wiki.eclipse.org/EclipseLink/UserGuide/JPA/Advanced_JPA_Development/NoSQL/Persistence_Units
Examples
http://wiki.eclipse.org/EclipseLink/Examples/JPA/NoSQL