Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javax.persistence.spi
Interface PersistenceProvider

    public interface PersistenceProvider

Interface implemented by the persistence provider. This interface is used to create an EntityManagerFactory. It is invoked by the container in Java EE environments and by the Persistence class in Java SE environments.

Method Summary
`EntityManagerFactory` | `createContainerEntityManagerFactory(PersistenceUnitInfo info, Map map)` Called by the container when an EntityManagerFactory is to be created.
`EntityManagerFactory` | `createEntityManagerFactory(String emName, Map map)` Called by Persistence class when an EntityManagerFactory is to be created.

Method Detail

### createEntityManagerFactory

    EntityManagerFactory createEntityManagerFactory(String emName,
                                                    Map map)

  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

### createContainerEntityManagerFactory

    EntityManagerFactory createContainerEntityManagerFactory(PersistenceUnitInfo info,
                                                             Map map)

  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).
  Returns:
    EntityManagerFactory for the persistence unit specified by the metadata

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD