Configure 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.
The 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.
- Configuring a default persistence provider
Use the default persistence provider, or specify a persistence provider for the application. With the application server's JPA persistence provider, we can take advantage of the stability and application extensions provided with the application server's implementation of JPA. We can decide which persistence implementation best fits the 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.
Subtopics
- Configure the JPA default persistence provider
Two persistence providers are included in the product: JPA for WebSphere Application Server persistence provider and Apache OpenJPA persistence provider. The Java Persistence API (JPA) for WebSphere Application Server persistence provider is the default provider for the product. We can use one of these two providers, or a third-party persistence provider, as the default provider.
Related concepts
Java Persistence API (JPA) architecture
Related tasks
Use third-party persistence providers Task overview: IBM Optim pureQuery Runtime