+

Search Tips   |   Advanced Search

Default Java Persistence API settings


The Java ™ Persistence API (JPA) spec requires a default provider to be defined. If we have applications that use JPA, it is recommended you use this page to provide default values. To increase the portability of the applications, we can use this page to configure the default JPA settings for applications running on this server instead of defining the <provider> element in each persistence unit in the applications. The JPA settings defined here 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: Application JPA settings always override the settings on this page.

To view this admin console page, click Applications > server > Container Services > Default Java Persistence API settings.

Default persistence provider

Specify the default persistence provider for the appserver container. The default persistence provider can be selected either from a list of providers that are included with WAS or a user-specified alternate persistence provider.

Select a persistence provider from the product list or specify a fully package qualified JPA implementation class name of an alternate persistence provider.

Default

com.ibm.websphere.persistence.PersistenceProviderImpl

Avoid trouble: If an alternate persistence provider is specified as the default, make sure the alternate persistence provider is created in the server. See the information center topic on using a third-party persistence provider.

Default JTA data source JNDI name

Specify the default JTA data source used by persistence units for the appserver container.

Select the JNDI name for the data source from the drop down box. The JTA data sources that are currently configured and visible to the application server are available in the drop down box selection.

Default

None

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.

Default non-JTA data source JNDI name

Specify the default non-JTA data source used by persistence units for the appserver container.

Select the JNDI name for the data source from the drop down box. The data sources that are currently configured, visible to the appserver, and are set to "non-transactional" are available in the drop down box selection.

Default

None

Avoid trouble: Some JPA entity features will 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 the information center topic on associating persistence units and data sources.






 

Related tasks


Use third-party persistence providers
Set a JDBC provider and data source
Associating persistence units and data sources

 

Related


Application server settings