Class ReadConnectionPool
java.lang.Object
org.eclipse.persistence.sessions.server.ConnectionPool
org.eclipse.persistence.sessions.server.ReadConnectionPool
Purpose: The read connection pool is used for read access through the server session. Any of the connection pools can be used for the read pool however this is the default. This pool allows for concurrent reads against the same JDBC connection and requires that the JDBC connection support concurrent read access.
-
Field Summary
Fields inherited from class org.eclipse.persistence.sessions.server.ConnectionPool
checkConnections, connectionsAvailable, connectionsUsed, DEAD_CHECK_TIME, deadCheckTime, failoverConnectionPools, INITIAL_CONNECTIONS, initialNumberOfConnections, isConnected, isDead, login, MAX_CONNECTIONS, maxNumberOfConnections, MIN_CONNECTIONS, minNumberOfConnections, MONITOR_HEADER, name, owner, timeOfDeath, WAIT_TIMEOUT, waitTimeout -
Constructor Summary
ConstructorsConstructorDescriptionPUBLIC: Build a new read connection pool.ReadConnectionPool(String name, Login login, int initialNumberOfConnections, int minNumberOfConnections, int maxNumberOfConnections, ServerSession owner) PUBLIC: Build a new read connection pool.ReadConnectionPool(String name, Login login, int minNumberOfConnections, int maxNumberOfConnections, ServerSession owner) PUBLIC: Build a new read connection pool.ReadConnectionPool(String name, Login login, ServerSession owner) PUBLIC: Build a new read connection pool. -
Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.persistence.internal.databaseaccess.AccessorINTERNAL: Wait until a connection is available and allocate the connection for the client.booleanINTERNAL: Concurrent reads are supported.voidreleaseConnection(org.eclipse.persistence.internal.databaseaccess.Accessor connection) INTERNAL: Because connections are not exclusive nothing is required.Methods inherited from class org.eclipse.persistence.sessions.server.ConnectionPool
addFailoverConnectionPool, buildConnection, failover, getConnectionsAvailable, getConnectionsUsed, getFailoverConnectionPools, getInitialNumberOfConnections, getLogin, getMaxNumberOfConnections, getMinNumberOfConnections, getName, getOwner, getTotalNumberOfConnections, getWaitTimeout, isConnected, isDead, isThereConflictBetweenLoginAndType, resetConnections, setCheckConnections, setConnectionsAvailable, setConnectionsUsed, setFailoverConnectionPools, setInitialNumberOfConnections, setIsConnected, setIsDead, setLogin, setMaxNumberOfConnections, setMinNumberOfConnections, setName, setOwner, setWaitTimeout, shutDown, startUp, toString
-
Constructor Details
-
ReadConnectionPool
public ReadConnectionPool()PUBLIC: Build a new read connection pool. -
ReadConnectionPool
PUBLIC: Build a new read connection pool. -
ReadConnectionPool
public ReadConnectionPool(String name, Login login, int minNumberOfConnections, int maxNumberOfConnections, ServerSession owner) PUBLIC: Build a new read connection pool. -
ReadConnectionPool
public ReadConnectionPool(String name, Login login, int initialNumberOfConnections, int minNumberOfConnections, int maxNumberOfConnections, ServerSession owner) PUBLIC: Build a new read connection pool.
-
-
Method Details
-
acquireConnection
public org.eclipse.persistence.internal.databaseaccess.Accessor acquireConnection() throws ConcurrencyExceptionINTERNAL: Wait until a connection is available and allocate the connection for the client.- Overrides:
acquireConnectionin classConnectionPool- Throws:
ConcurrencyException
-
hasConnectionAvailable
public boolean hasConnectionAvailable()INTERNAL: Concurrent reads are supported.- Overrides:
hasConnectionAvailablein classConnectionPool
-
releaseConnection
public void releaseConnection(org.eclipse.persistence.internal.databaseaccess.Accessor connection) throws DatabaseException INTERNAL: Because connections are not exclusive nothing is required.- Overrides:
releaseConnectionin classConnectionPool- Throws:
DatabaseException
-