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 |
---|---|
|
Starting (initial) number of connections |
|
Minimum number of connections |
|
Maximum number of connections. |
|
Amount of time (in milliseconds) to wait for a connection from the pool. |
|
URL of the JDBC for the connection |
|
For read connection pools, indicates that read connections are shared across threads. |
|
JTA DataSource name to use for the connection, if different than the default |
|
Non-JTA DataSource name to use for the connection, if different than the default |
|
Username to use for this connection (if different than the default). |
|
Password of the |
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:
Partitioning Examples
http://wiki.eclipse.org/EclipseLink/Examples/JPA/Partitioning
"Connection Pools" in Understanding EclipseLink
"Connection Pooling" in Solutions Guide for EclispeLink