javax.persistence.spi.PersistenceProvider - JPA interface

javax.persistence.spi
Interface PersistenceProvider

Interface implemented by the persistence provider.

It is invoked by the container in Java EE environments and by the javax.persistence.Persistence class in Java SE environments to create an javax.persistence.EntityManagerFactory.

Since:
JPA 1.0
Called by the container when an EntityManagerFactory is to be created.
Called by the container when an EntityManagerFactory is to be created.
Parameters:
info - metadata for use by the persistence provider
map - a Map of integration-level properties for use by the persistence provider (may be null if no properties are specified). If a Bean Validation provider is present in the classpath, the container must pass the ValidatorFactory instance in the map with the key "javax.persistence.validation.factory".
Returns:
EntityManagerFactory for the persistence unit specified by the metadata
Since:
JPA 1.0
Called by Persistence class when an EntityManagerFactory is to be created.
Called by Persistence class when an EntityManagerFactory is to be created.
Parameters:
emName - the name of the persistence unit
map - a Map of properties for use by the persistence provider. These properties may be used to override the values of the corresponding elements in the persistence.xml file or specify values for properties not specified in the persistence.xml (and may be null if no properties are specified).
Returns:
EntityManagerFactory for the persistence unit, or null if the provider is not the right provider
Since:
JPA 1.0
Return the utility interface implemented by the persistence provider.
Return the utility interface implemented by the persistence provider.
Returns:
ProviderUtil interface
Since:
JPA 2.0

This documentation page is derived (with some adjustments) from the open source JPA 2 RI (EclipseLink)
and is available under the terms of the Eclipse Public License, v. 1.0 and Eclipse Distribution License, v. 1.0.
Object Relational Mapping (ORM) JPA 2 providers include Hibernate, EclipseLink, TopLink, OpenJPA and DataNucleus.
ObjectDB is not an ORM JPA implementation but an Object Database for Java with built in JPA 2 support.