Hitachi

uCosminexus Application Server Compatibility Guide


13.2.2 Cosminexus JPA Provider-specific properties that can be specified in the <property> tag

This section describes the Cosminexus JPA Provider-specific properties specified in the <property> tag of persistence.xml.

Cosminexus JPA Provider does not have properties that can be specified as arguments for createEntityManager() of EntityManagerFactory. Note that even if the attribute values of the persistence.xml file properties are numeric, you make sure that the value is enclosed in quotation marks (double quotations or single quotations).

Important note

In Cosminexus JPA Provider, you cannot specify a property beginning with javax included in JPA specifications, within the <property> tag. The operations might not execute normally if a property beginning with javax included in JPA specifications is specified in the <property> tag of persistence.xml.

Also, you do not specify a property beginning with javax included in JPA specifications as a system property. The properties beginning with javax included in JPA specifications are as follows:

  • javax.persistence.transactionType

  • javax.persistence.jtaDataSource

  • javax.persistence.nonJtaDataSource

  • javax.persistence.provider

The following is the description related to the Cosminexus JPA Provider-specific properties:

You specify these properties in the <property> tag of the persistence.xml file.

If a value outside the specifiable range is set for a property, an exception occurs during the deployment. Also, the value is case sensitive.

The following table describes the Cosminexus JPA Provider-specific properties:

Table 13‒5: Cosminexus JPA Provider-specific properties

Property name

Contents

Specifiable value

Default

cosminexus.jpa.cache.size.<ENTITY>

Specify the initial size to be set for the entity cache specified in <ENTITY>.

If a cache type is Full, set the initial size for the entity cache.

If a cache type is HardWeak or SoftWeak, set the maximum size for the entity cache.

Specify the cache size using the maximum ID count (record count) of the entities invoked in all as a standard.

0 to 2147483647

1000

cosminexus.jpa.cache.size.default

Specify the default cache size used when the entity is cached.

If a cache type is Full, set the initial size for the entity cache.

If a cache type is HardWeak or SoftWeak, set the maximum size for the entity cache.

Specify the cache size using the maximum ID count (record count) of the entities invoked in all as a standard.

0 to 2147483647

1000

cosminexus.jpa.cache.type.<ENTITY>

Specify the entity cache type specified in <ENTITY>.

You can specify the following strings:

  • Full

  • Weak

  • HardWeak

  • SoftWeak

  • NONE

SoftWeak

cosminexus.jpa.cache.type.default

Specify the default cache type.

You can specify the following strings:

  • Full

  • Weak

  • HardWeak

  • SoftWeak

  • NONE

SoftWeak

cosminexus.jpa.target-database

Specify the name of a database you want to connect to. To classify the database-specific processing, the class implementing the database-specific part is read according to the specified value.

When Auto is specified, the database is automatically identified from the resource information specified for <jta-data-source> or <non-jta-data-source> in persistence.xml when a request is sent to the CJPA provider for the first time. For this reason, the processing time is slightly longer than when the database name is specified.

Normally, Hitachi recommends you to specify the name of the database without using Auto.

The following strings can be specified:

  • Auto

  • HiRDB

  • Oracle

Auto