Java Persistence API (JPA) Extensions Reference for EclipseLink, Release 2.4
  Go To Table Of Contents
 Search
 PDFComments
Comments


connection-pool

Use eclipselink.connection-pool to configure the various connection pool properties.


Values

Table 5-24 describes this persistence property's values.

Table 5-24 Valid Values for connection-pool

Value Description

initial

Starting (initial) number of connections

min

Minimum number of connections

max

Maximum number of connections.

wait

Amount of time (in milliseconds) to wait for a connection from the pool.

url

URL of the JDBC for the connection

shared

For read connection pools, indicates that read connections are shared across threads.

jtaDataSource

JTA DataSource name to use for the connection, if different than the default

nonJtaDataSource

Non-JTA DataSource name to use for the connection, if different than the default

user

Username to use for this connection (if different than the default).

password

Password of the user for this connection (if different than the default)



Usage

Append the name of the connection pool and property to be configured. If connection pool is specified, EclipseLink configures the default (write) pool.


Examples

Example 5-14 shows how to use this property in the persistence.xml file.

Example 5-14 Using connection-pool in persistence.xml

<property name="eclipselink.connection-pool.default.initial" value="1" />
<property name="eclipselink.connection-pool.node2.min" value="16"/>
<property name="eclipselink.connection-pool.node2.max" value="16"/>
<property name="eclipselink.connection-pool.node2.url" value="jdbc:oracle:thin:@node2:1521:orcl"/>
 


See Also

For more information, see: