6.18 Defining persistence.xml

This section describes the definition for the cache functionality of the entity objects, which is a Cosminexus JPA Provider-specific functionality, and the notes on data source specification for defining persistence.xml.

Organization of this section
(1) Defining the cache functionality of the entity objects
(2) Notes on data source specification

(1) Defining the cache functionality of the entity objects

You define the cache functionality of the entity objects provided with Cosminexus JPA Provider in the property tag of persistence.xml. The following table describes the definition of the cache functionality of the entity objects in persistence.xml.

Table 6-26 Definition of the cache functionality of the entity objects in persistence.xml

Specified propertiesSettings
cosminexus.jpa.cache.size.<ENTITY>Specify the cache size for caching the entity.
cosminexus.jpa.cache.size.defaultSpecify the default cache size for caching the entity.
cosminexus.jpa.cache.type.<ENTITY>Specify the cache type of the entity.
cosminexus.jpa.cache.type.defaultSpecify the default cache type of the entity.
cosminexus.jpa.target-databaseSpecify the name of the database to be connected to.

For details on tags, see 6.2.2 Cosminexus JPA Provider-specific properties that can be specified in the property tag in the uCosminexus Application Server Definition Reference Guide.

Reference note
The properties described here are properties unique to Cosminexus JPA Provider. In persistence.xml, you can specify other properties defined in the JPA specifications. However, in Cosminexus JPA Provider, you cannot use properties beginning with javax that are defined in the JPA specifications.

(2) Notes on data source specification

With the data source specification in persistence.xml, you can use the user-specified Namespace functionality, which is an Application Server functionality, to assign an optional name to the resource adapter. If you set an optional name for the resource adapter in the persistence.xml settings, the optional name of the resource adapter must also be defined in the HITACHI Connector Property file. For details, see 6.19 Settings in the execution environment.