Show TOC

Background documentationThe persistence.xml File Locate this document in the navigation structure

 

The persistence.xml is a configuration file for setting standard and specific configuration properties of the persistence unit that your entities belong to.

The following table shows the SAP implementation-specific properties of JPA that can be configured in the persistence.xml:

Property

Description

com.sap.jpa.sql.mapping

Setting this property, you can control the JPA calculation of the SQL statements that are sent to the database.

The possible values are:

  • cached — JPA caches SQL statements dynamically.

  • precomputed — JPA computes the SQL statements eagerly, upon the entity manager factory creation. This option eliminates the computation time of the SQL mapper results, but consumes slightly more memory.

com.sap.jpa.versioning.generator.tablename

When you are working with the system DataSource, which has a default isolation level read_uncommitted, and you are using versioned entities, you can set this property to specify a table name to be used by the version generator.

More information: Versioning and Dirty Reads

com.sap.jpa.execution.foreign-key-handling

Setting this property, you specify the strategy to be used for handling foreign key constraints on the database.

The possible value is:

  • topological

More information: Native Databases with Foreign Key Constraints

com.sap.jpa.cache.read-only-classes

Using this property, you declare read-only entities.

More information: Caches in the JPA Implementation

The value of this property is a comma-separated list of the fully qualified class names of the entities that are read-only.

com.sap.jpa.compliance.sap-product-standard

This property enables/disables the SAP Product Standard Compliance check.

The possible values are:

  • true

  • false

Enabling this property prevents the usage of the Entity cache and the Query Result cache.

More information: Caches in the JPA Implementation

SAP Note 1169694

For information about the standard configurable properties of the persistence.xml, refer to http://java.sun.com.