Connection

The following table lists the properties available in the Connection page of the persistence.xml Editor.

Property Description Default

Transaction type

Specify if the connection for this persistence unit uses one of the following transaction types:

  • Default -- Select to use the container used by the container.

  • JTA (Java Transaction API) -- Transactions of the Java EE server.

  • Resource Local -- Native actions of a JDBC driver that are referenced by a persistence unit.

JTA

Batch writing

Specify the use of batch writing to optimize transactions with multiple write operations.

Set the value of this property into the session at deployment time.

Note: This property applies when used both in a Java SE and Java EE environment.

The following are the valid values for oracle.toplink.config.BatchWriting:

  • JDBC–Use JDBC batch writing.

  • Buffered–Do not use either JDBC batch writing nor native platform batch writing.

  • OracleJDBC–Use both JDBC batch writing and Oracle native platform batch writing.

  • None–Do not use batch writing (turn it off).

None

Statement caching

Specify if the query caches its JDBC statement. If enabled, you can also set the number of statements to cache.

50

Native SQL

Specify if Dali includes platform-specific (that is, "native") SQL statements. If false, Dali uses generic SLQ.

False

Database



JTA Data Source Name

If you selected JTA as the transaction type, then enter the name of the default JTA data source for the persistence unit.


Non-JTA Data Source Name

If you selected Resource Local as the transaction type, then enter the name of the non-JTA data source.

This property is not available for projects using the Generic platform.


EclipseLink connection pool

Define the connection pool driver, URL, user name and password.

These properties are note available for projects using the Generic platform.


Bind parameters

Control whether or not the query uses parameter binding.

Note: This property applies when used in a Java SE environment.

This property is not available for projects using the Generic platform.

True

Read Connection

The maximum and minimum number of connections allowed in the JDBC read connection pool.

Note: These property apply when used in a Java SE environment.

These properties are not available for projects using the Generic platform

Minimum: 2

Maximum 2

Write Connection

The maximum and minimum number of connections allowed in the JDBC read connection pool.

Note: These property apply when used in a Java SE environment.

These properties are not available for projects using the Generic platform

Minimum: 5

Maximum 10

Exclusive connections

These fields are available only when Transaction Type is Local Resource.


Exclusive connection mode

Specify when Dali performs reads through the write connection.

  • Always – Create an exclusive isolated client session if reading an isolated entity, otherwise create an exclusive client session.

  • Isolated – Create an exclusive isolated client session if reading an isolated entity, otherwise raise an error.

  • Transactional – Create an isolated client session if some or all entities require isolated cache, otherwise create a client session.

Transactional

Lazy connection acquisition

Specify if Dali acquires write connections lazily.

True


Related references