Top Description Fields Constructors Methods
org.eclipse.persistence.sessions.server

public Class ExternalConnectionPool

extends ConnectionPool
Class Inheritance
Imports
org.eclipse.persistence.internal.databaseaccess.*, org.eclipse.persistence.logging.SessionLog, org.eclipse.persistence.sessions.Login, org.eclipse.persistence.exceptions.*

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

Modifier and TypeField and Description
protected Accessor
Inherited from org.eclipse.persistence.sessions.server.ConnectionPool:
checkConnectionsconnectionsAvailableconnectionsUsedDEAD_CHECK_TIMEdeadCheckTimefailoverConnectionPoolsINITIAL_CONNECTIONSinitialNumberOfConnectionsisConnectedisDeadloginMAX_CONNECTIONSmaxNumberOfConnectionsMIN_CONNECTIONSminNumberOfConnectionsMONITOR_HEADERnameownertimeOfDeathWAIT_TIMEOUTwaitTimeout

Constructor Summary

AccessConstructor and Description
public
ExternalConnectionPool()

PUBLIC: Build a new external connection pool.

public
ExternalConnectionPool(String name, Login login, ServerSession owner)

PUBLIC: Build a new external connection pool.

Method Summary

Modifier and TypeMethod and Description
public Accessor
acquireConnection()

Overrides org.eclipse.persistence.sessions.server.ConnectionPool.acquireConnection.

INTERNAL: When we acquire a connection from an ExternalConnectionPool we build a new connection (retrieve it from the external pool).
protected Accessor

Returns:

org.eclipse.persistence.internal.databaseaccess.Accessor
getCachedConnection
()

INTERNAL: Return the currently cached connection to the external connection pool

public boolean
hasConnectionAvailable()

Overrides org.eclipse.persistence.sessions.server.ConnectionPool.hasConnectionAvailable.

INTERNAL: Assume true as the driver is responsible for blocking.
public boolean
isThereConflictBetweenLoginAndType()

Overrides org.eclipse.persistence.sessions.server.ConnectionPool.isThereConflictBetweenLoginAndType.

INTERNAL: Checks for a conflict between pool's type and pool's login
public void
releaseConnection(Accessor connection)

Overrides org.eclipse.persistence.sessions.server.ConnectionPool.releaseConnection.

INTERNAL: When you release an external connection, you simply let it go.
protected void
setCachedConnection(Accessor cachedConnection)

Set the currently cached connection to the external connection pool.

public void
setCheckConnections()

Overrides org.eclipse.persistence.sessions.server.ConnectionPool.setCheckConnections.

INTERNAL: This method is called to indicate that all available connections should be checked.
public synchronized void
shutDown()

Overrides org.eclipse.persistence.sessions.server.ConnectionPool.shutDown.

INTERNAL: This mehtod is a no-op for external pools.
public synchronized void
startUp()

Overrides org.eclipse.persistence.sessions.server.ConnectionPool.startUp.

INTERNAL: Build the default connection.
Inherited from org.eclipse.persistence.sessions.server.ConnectionPool:
addFailoverConnectionPoolbuildConnectionfailovergetConnectionsAvailablegetConnectionsUsedgetFailoverConnectionPoolsgetInitialNumberOfConnectionsgetLogingetMaxNumberOfConnectionsgetMinNumberOfConnectionsgetNamegetOwnergetTotalNumberOfConnectionsgetWaitTimeoutisConnectedisDeadresetConnectionssetConnectionsAvailablesetConnectionsUsedsetFailoverConnectionPoolssetInitialNumberOfConnectionssetIsConnectedsetIsDeadsetLoginsetMaxNumberOfConnectionssetMinNumberOfConnectionssetNamesetOwnersetWaitTimeouttoString

Field Detail

cachedConnectionback to summary
protected Accessor cachedConnection

Constructor Detail

ExternalConnectionPoolback to summary
public ExternalConnectionPool()

PUBLIC: Build a new external connection pool. The JDBC driver is responsible for pooling the connections.

ExternalConnectionPoolback to summary
public ExternalConnectionPool(String name, Login login, ServerSession owner)

PUBLIC: Build a new external connection pool. The JDBC driver is responsible for pooling the connections.

Method Detail

acquireConnectionback to summary
public Accessor acquireConnection() throws ConcurrencyException

Overrides org.eclipse.persistence.sessions.server.ConnectionPool.acquireConnection.

INTERNAL: When we acquire a connection from an ExternalConnectionPool we build a new connection (retrieve it from the external pool).

Annotations
@Override
getCachedConnectionback to summary
protected Accessor getCachedConnection()

INTERNAL: Return the currently cached connection to the external connection pool

Returns:Accessor

org.eclipse.persistence.internal.databaseaccess.Accessor

hasConnectionAvailableback to summary
public boolean hasConnectionAvailable()

Overrides org.eclipse.persistence.sessions.server.ConnectionPool.hasConnectionAvailable.

INTERNAL: Assume true as the driver is responsible for blocking.

Annotations
@Override
isThereConflictBetweenLoginAndTypeback to summary
public boolean isThereConflictBetweenLoginAndType()

Overrides org.eclipse.persistence.sessions.server.ConnectionPool.isThereConflictBetweenLoginAndType.

INTERNAL: Checks for a conflict between pool's type and pool's login

Annotations
@Override
releaseConnectionback to summary
public void releaseConnection(Accessor connection) throws DatabaseException

Overrides org.eclipse.persistence.sessions.server.ConnectionPool.releaseConnection.

INTERNAL: When you release an external connection, you simply let it go.

Annotations
@Override
setCachedConnectionback to summary
protected void setCachedConnection(Accessor cachedConnection)

Set the currently cached connection to the external connection pool.

setCheckConnectionsback to summary
public void setCheckConnections()

Overrides org.eclipse.persistence.sessions.server.ConnectionPool.setCheckConnections.

INTERNAL: This method is called to indicate that all available connections should be checked. Noop on external connection pool.

Annotations
@Override
shutDownback to summary
public synchronized void shutDown()

Overrides org.eclipse.persistence.sessions.server.ConnectionPool.shutDown.

INTERNAL: This mehtod is a no-op for external pools.

Annotations
@Override
startUpback to summary
public synchronized void startUp()

Overrides org.eclipse.persistence.sessions.server.ConnectionPool.startUp.

INTERNAL: Build the default connection. This validates that connect will work and sets up the parent accessor to clone.

Annotations
@Override