Default Java Persistence API settings

To increase the portability of your 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 your applications.

You 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 Java Naming and Directory Interface (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.

Avoid trouble Avoid trouble: Application JPA settings always override the settings on this page. gotcha

To view this administrative console page, click Servers > Server Types > WebSphere application servers > server_name > 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 that are 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
Avoid trouble Avoid trouble: 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.gotcha

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
Avoid trouble Avoid trouble: 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.gotcha

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
Avoid trouble Avoid trouble: 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 your application needs. For information on configuring a non-JTA data source, see information about associating persistence units and data sources.gotcha

Icon that indicates the type of topic Reference topic



Timestamp icon Last updated: March 5, 2017 17:56
File name: uejb_jpasettings.html