Default Java Persistence API settings
To increase the portability of the applications, use this page to configure the default Java Persistence API (JPA) settings for applications running on this server instead of defining the <provider> element in each persistence unit in the applications.
We can choose a default JPA persistence provider, a data source to use by default when enlisting in Java Transaction API (JTA) transactions, and a data source that the JPA persistence provider can use for operations that must avoid enlistment in JTA transactions. The data sources are identified by their JNDI name. The JPA settings defined on this page are used for the persistence unit of an application only when the application does not define the JPA settings for that persistence unit.
Application JPA settings always override the settings on this page..
From the admin console, click...
Servers > Server Types > WebSphere application servers > server > Container Services > Default Java Persistence API settings.
JPA specification
Specify the JPA specification to use for the default provider. Select from the list of supported specification levels.
- Default
- 2.1
Default persistence provider
Specify the default persistence provider for the application server container.
Select a persistence provider from the list of providers included with the product or specify a fully package qualified JPA implementation class name of an alternate persistence provider.
- Default for JPA 2.1
- org.eclipse.persistence.jpa.PersistenceProvider
- Default for JPA 2.0
- com.ibm.websphere.persistence.PersistenceProviderImpl
If an alternate persistence provider is specified as the default, make sure the alternate persistence provider is created in the server. See information about using a third-party persistence provider.
Default JTA data source JNDI name
Specify the default JTA data source used by persistence units for the application server container.
Select the JNDI name for the data source from the list of JTA data sources that are currently configured and visible to the application server.
- Default
- None
If a default JTA data source is not specified, ensure an appropriate JTA data source is specified in the <jta-data-source> or connection properties field in the <properties> element in the persistence unit.
Default non-JTA data source JNDI name
Specify the default non-JTA data source used by persistence units for the application server container.
Select the JNDI name for the data source from the list. The data sources that are currently configured, visible to the application server, and set to non-transactional are available in the list.
- Default
- None
Some JPA entity features require a non-JTA data source to be specified. An example of this is automatic entity identity generation. Ensure a non-JTA data source is configured to match the application needs. For information on configuring a non-JTA data source, see information about associating persistence units and data sources.
Use third-party persistence providers Configure a JDBC provider and data source Associating persistence providers and data sources Configure the WSJPA persistence provider Application server settings