Configuring persistence provider support in the application server

Persistence providers are implementations of the Java™ Persistence API (JPA) specification and can be deployed in the Java EE compliant application server that supports JPA persistence.

About this task

The Enterprise JavaBeans (EJB) 3.0 and later specifications require that an application server container that supports the EJB 3.0 and later programming model must provide a JPA implementation. This is also referred to as a persistence provider. There are two built-in JPA persistence providers: the JPA persistence provider for the application server and the OpenJPA persistence provider. If an explicit provider element is not specified in the persistence unit definitions, the application server will use the default persistence provider, which is the JPA persistence provider for the application server.

The application server provides both the default persistence provider and the Apache OpenJPA persistence provider to support the open source implementation of JPA and allow for easy migration of existing OpenJPA applications to the application server's solution for JPA.

Procedure

  • Configuring a default persistence provider

    Use the default persistence provider, or specify a persistence provider for your application. With the application server's JPA persistence provider, you can take advantage of the stability and application extensions that are provided with the application server's implementation of JPA. You can decide which persistence implementation best fits your needs. If an application relies on a specific persistence provider for certain functions and settings, you should specify the provider in the persistence unit definition to avoid any incompatibilities.

  • Using third-party persistence providers

    Use third-party persistence providers in the application server environment.