public class ExternalConnectionPool extends ConnectionPool
Purpose: This subclass is intended to be used with external connection pools. For these pools, TopLink does not control the pooling behaviour. The login should have the usesExternalConnectionPooling set to "true".
| Modifier and Type | Field and Description |
|---|---|
protected Accessor |
cachedConnection |
connectionsAvailable, connectionsUsed, isConnected, login, maxNumberOfConnections, minNumberOfConnections, name, owner| Constructor and Description |
|---|
ExternalConnectionPool()
PUBLIC:
Build a new external connection pool.
|
ExternalConnectionPool(java.lang.String name,
Login login,
ServerSession owner)
PUBLIC:
Build a new external connection pool.
|
| Modifier and Type | Method and Description |
|---|---|
Accessor |
acquireConnection()
INTERNAL:
When we acquire a connection from an ExternalConnectionPool we build
a new connection (retrieve it from the external pool).
|
protected Accessor |
getCachedConnection()
INTERNAL:
Return the currently cached connection to the external connection pool
|
boolean |
hasConnectionAvailable()
INTERNAL:
Assume true as the driver is responsible for blocking.
|
boolean |
isThereConflictBetweenLoginAndType()
INTERNAL:
Checks for a conflict between pool's type and pool's login
|
void |
releaseConnection(Accessor connection)
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.
|
void |
shutDown()
INTERNAL:
This mehtod is a no-op for external pools.
|
void |
startUp()
INTERNAL:
Build the default connection.
|
buildConnection, getConnectionsAvailable, getConnectionsUsed, getLogin, getMaxNumberOfConnections, getMinNumberOfConnections, getName, getOwner, getTotalNumberOfConnections, isConnected, resetConnections, setConnectionsAvailable, setConnectionsUsed, setIsConnected, setLogin, setMaxNumberOfConnections, setMinNumberOfConnections, setName, setOwner, toStringprotected Accessor cachedConnection
public ExternalConnectionPool()
public ExternalConnectionPool(java.lang.String name,
Login login,
ServerSession owner)
public Accessor acquireConnection() throws ConcurrencyException
acquireConnection in class ConnectionPoolConcurrencyExceptionprotected Accessor getCachedConnection()
public boolean hasConnectionAvailable()
hasConnectionAvailable in class ConnectionPoolpublic boolean isThereConflictBetweenLoginAndType()
isThereConflictBetweenLoginAndType in class ConnectionPoolpublic void releaseConnection(Accessor connection) throws DatabaseException
releaseConnection in class ConnectionPoolDatabaseExceptionprotected void setCachedConnection(Accessor cachedConnection)
oracle.toplink.essentials.internal.databaseaccess.Accessor - public void shutDown()
shutDown in class ConnectionPoolpublic void startUp()
startUp in class ConnectionPool