org.eclipse.persistence.sessions.server
Class ExternalConnectionPool

java.lang.Object
  extended by org.eclipse.persistence.sessions.server.ConnectionPool
      extended by org.eclipse.persistence.sessions.server.ExternalConnectionPool

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 behavior. The login should have the usesExternalConnectionPooling set to "true".


Field Summary
 
Fields inherited from class org.eclipse.persistence.sessions.server.ConnectionPool
INITIAL_CONNECTIONS, MAX_CONNECTIONS, MIN_CONNECTIONS, WAIT_TIMEOUT
 
Constructor Summary
ExternalConnectionPool()
          PUBLIC: Build a new external connection pool.
ExternalConnectionPool(String name, Login login, ServerSession owner)
          PUBLIC: Build a new external connection pool.
 
Method Summary
 org.eclipse.persistence.internal.databaseaccess.Accessor acquireConnection()
          INTERNAL: When we acquire a connection from an ExternalConnectionPool we build a new connection (retrieve it from the external 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(org.eclipse.persistence.internal.databaseaccess.Accessor connection)
          INTERNAL: When you release an external connection, you simply let it go.
 void setCheckConnections()
          INTERNAL: This method is called to indicate that all available connections should be checked.
 void shutDown()
          INTERNAL: This mehtod is a no-op for external pools.
 void startUp()
          INTERNAL: Build the default connection.
 
Methods inherited from class org.eclipse.persistence.sessions.server.ConnectionPool
getConnectionsAvailable, getInitialNumberOfConnections, getLogin, getMaxNumberOfConnections, getMinNumberOfConnections, getName, getTotalNumberOfConnections, getWaitTimeout, isConnected, resetConnections, setInitialNumberOfConnections, setIsConnected, setLogin, setMaxNumberOfConnections, setMinNumberOfConnections, setName, setWaitTimeout, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExternalConnectionPool

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


ExternalConnectionPool

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

acquireConnection

public org.eclipse.persistence.internal.databaseaccess.Accessor acquireConnection()
                                                                           throws ConcurrencyException
INTERNAL: When we acquire a connection from an ExternalConnectionPool we build a new connection (retrieve it from the external pool).

Overrides:
acquireConnection in class ConnectionPool
Throws:
ConcurrencyException

hasConnectionAvailable

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

Overrides:
hasConnectionAvailable in class ConnectionPool

isThereConflictBetweenLoginAndType

public boolean isThereConflictBetweenLoginAndType()
INTERNAL: Checks for a conflict between pool's type and pool's login

Overrides:
isThereConflictBetweenLoginAndType in class ConnectionPool

releaseConnection

public void releaseConnection(org.eclipse.persistence.internal.databaseaccess.Accessor connection)
                       throws DatabaseException
INTERNAL: When you release an external connection, you simply let it go.

Overrides:
releaseConnection in class ConnectionPool
Throws:
DatabaseException

setCheckConnections

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

Overrides:
setCheckConnections in class ConnectionPool

shutDown

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

Overrides:
shutDown in class ConnectionPool

startUp

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

Overrides:
startUp in class ConnectionPool