anvil.database |
|
Java Source File Name | Type | Comment |
CannotReturnPooledConnectionException.java | Class | This exception is thrown, if ConnectionManager is unable
to return a PooledConnection before timeout. |
ConnectionAccessQueue.java | Class | ConnectionAccessQueue is used by ConnectionManager
when acquiring connections from the pool. |
ConnectionFactory.java | Interface | Interface for factory used by ConnectionPool to create the
actual PooledConnection instances. |
ConnectionManager.java | Class | Class providing interface for acquiring and
releasing JDBC connections.
Usage:
import java.sql.*;
import anvil.database.*;
ConnectionManager manager = ...;
PooledConnection connImpl = null;
Connection conn = null;
try {
connImpl = manager.acquire("njet");
conn = (Connection)connImpl.getConnection();
// do some work
} catch (NoConnectionPoolException e) {
// handle error
} catch (CannotReturnPooledConnectionException e) {
// handle error
} catch (SQLException e) {
// It is recommended that the connection is closed in case of SQLException. |
ConnectionMonitor.java | Interface | Interface for monitoring events related to connections. |
ConnectionMonitorImpl.java | Class | |
ConnectionObserver.java | Interface | Interface through which the notification of available connections
is dispatched. |
ConnectionPool.java | Class | Pool for storing limited amount of connections as PooledConnection .
Pool is used by ConnectionAccessQueue which takes care of the situations
when connections aren't immediately available.
Methods which might alter the connection vectors are internally synchronized so
that only one thread at a time can perform operations on them. |
ConnectionPoolPermission.java | Class | |
NoConnectionPoolException.java | Class | This exception is thrown, if ConnectionManager cannot
find the named ConnectionPool . |
PooledConnection.java | Class | Abstract class wrapping connection objects. |