Module org.eclipse.persistence.core
Class ExternalConnectionPool
java.lang.Object
org.eclipse.persistence.sessions.server.ConnectionPool
org.eclipse.persistence.sessions.server.ExternalConnectionPool
Purpose: This subclass is intended to be used with external connection pools. For these pools, TopLink does not control the pooling behavior. The login should have the usesExternalConnectionPooling set to "true".
-
Field Summary
FieldsFields 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 external connection pool.ExternalConnectionPool(String name, Login login, ServerSession owner) PUBLIC: Build a new external connection pool. -
Method Summary
Modifier and TypeMethodDescriptionINTERNAL: When we acquire a connection from an ExternalConnectionPool we build a new connection (retrieve it from the external pool).protected AccessorINTERNAL: Return the currently cached connection to the external connection poolbooleanINTERNAL: Assume true as the driver is responsible for blocking.booleanINTERNAL: Checks for a conflict between pool's type and pool's loginvoidreleaseConnection(Accessor connection) INTERNAL: When you release an external connection, you simply let it go.protected voidsetCachedConnection(Accessor cachedConnection) Set the currently cached connection to the external connection pool.voidINTERNAL: This method is called to indicate that all available connections should be checked.voidshutDown()INTERNAL: This mehtod is a no-op for external pools.voidstartUp()INTERNAL: Build the default connection.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, resetConnections, setConnectionsAvailable, setConnectionsUsed, setFailoverConnectionPools, setInitialNumberOfConnections, setIsConnected, setIsDead, setLogin, setMaxNumberOfConnections, setMinNumberOfConnections, setName, setOwner, setWaitTimeout, toString
-
Field Details
-
cachedConnection
-
-
Constructor Details
-
ExternalConnectionPool
public ExternalConnectionPool()PUBLIC: Build a new external connection pool. The JDBC driver is responsible for pooling the connections. -
ExternalConnectionPool
PUBLIC: Build a new external connection pool. The JDBC driver is responsible for pooling the connections.
-
-
Method Details
-
acquireConnection
INTERNAL: When we acquire a connection from an ExternalConnectionPool we build a new connection (retrieve it from the external pool).- Overrides:
acquireConnectionin classConnectionPool- Throws:
ConcurrencyException
-
getCachedConnection
INTERNAL: Return the currently cached connection to the external connection pool- Returns:
- org.eclipse.persistence.internal.databaseaccess.Accessor
-
hasConnectionAvailable
public boolean hasConnectionAvailable()INTERNAL: Assume true as the driver is responsible for blocking.- Overrides:
hasConnectionAvailablein classConnectionPool
-
isThereConflictBetweenLoginAndType
public boolean isThereConflictBetweenLoginAndType()INTERNAL: Checks for a conflict between pool's type and pool's login- Overrides:
isThereConflictBetweenLoginAndTypein classConnectionPool
-
releaseConnection
INTERNAL: When you release an external connection, you simply let it go.- Overrides:
releaseConnectionin classConnectionPool- Throws:
DatabaseException
-
setCachedConnection
Set the currently cached connection to the external connection pool. -
setCheckConnections
public void setCheckConnections()INTERNAL: This method is called to indicate that all available connections should be checked. Noop on external connection pool.- Overrides:
setCheckConnectionsin classConnectionPool
-
shutDown
public void shutDown()INTERNAL: This mehtod is a no-op for external pools.- Overrides:
shutDownin classConnectionPool
-
startUp
public void startUp()INTERNAL: Build the default connection. This validates that connect will work and sets up the parent accessor to clone.- Overrides:
startUpin classConnectionPool
-