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.
避免困難: Application JPA settings always override the settings on this page. gotchaTo view this administrative console page, click .
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.
- 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.gotchaDefault JTA data source JNDI name
Specify the default JTA data source used by persistence units for the application server container.
- 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.gotchaDefault non-JTA data source JNDI name
Specify the default non-JTA data source used by persistence units for the application server container.
- 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 your application needs. For information on configuring a non-JTA data source,
see information about associating persistence units and data sources.gotcha
參照主題