Contents

NoSQL Persistence Units

NoSQL persistence units are configured the same as JPA persistence units. The persistence.xml is used to define the persistence unit. NoSQL persistence units can be application managed, JTA managed, injected, or created through Persistence the same as regular JPA persistence units. NoSQL persistence units do have some specific persistence unit properties that are required, and have some limitations.

NoSQL defines the following persistence unit properties:

"eclipselink.nosql.connection-spec" - this specifies an EISConnectionSpec class name that defines how to connect to the NoSQL data-source.

"eclipselink.nosql.connection-factory" - this specifies the JNDI name of a JCA ConnectionFactory, or a JCA ConnectionFactory class name that connects to the NoSQL data-source.

"eclipselink.nosql.property." - this prefix is used to pass driver specific properties to the NoSQL connection spec.

"eclipselink.target-database" - this is used to set the NoSQL platform class, or use "org.eclipse.persistence.eis.EISPlatform" for a generic platform.

NoSQL persistence units have the following restrictions:

<jta-data-source>, <non-jta-data-source> - these are not supported, as they refer to JDBC DataSources.

NoSQL Platforms

EclipseLink provides the following NoSQL platforms and connection specs. To use a NoSQL platform you must set both the "eclipselink.nosql.connection-spec" to the connection spec class name and the "eclipselink.target-database" to the platform class name. Each NoSQL platform also supports platform specific properties that can be set using "eclipselink.nosql.property.".