Package overit.geocall.sql
Class DataSourceConnectionPool
java.lang.Object
overit.geocall.sql.ConnectionPool<DataSourcePooledConnection>
overit.geocall.sql.DataSourceConnectionPool
Class that implements the DataSource
ConnectionPool, that uses the Java Naming and Directory
Interface (JNDI) API-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final DataSourceprotected final HashSetprotected final WeakHashMap<PooledConnectionInfo, Object> static final StringFields inherited from class overit.geocall.sql.ConnectionPool
_dbom, _dbSetupStatments, _maxQueryRows, _name, _ph, _qh, cross, encryptionKey, TYPE_DATASOURCE, TYPE_ELASTIC, TYPE_STANDARD -
Constructor Summary
ConstructorsConstructorDescriptionDataSourceConnectionPool(String name, String jndiName) Creates a DataSourceConnectionPool with the specified names and parameters -
Method Summary
Modifier and TypeMethodDescriptiongetConnection(String activity) Extracts a Connection from the poolReturns the informations about the connections of the poolintlocked()Returns the number of locked connections, i.e. the connections that are currently used by the applicationvoidReleases a Connection previously extracted withgetConnection()intsize()Returns the size of the ConnectionPoolMethods inherited from class overit.geocall.sql.ConnectionPool
dispose, getCross, getDBObjectMap, getDBType, getEncryptionKey, getHistory, getMaxQueryRows, getName, getParameters, getQueryHistory, setCross, setDBType, setEncryptionKey
-
Field Details
-
JAVA_COMP_ENV
- See Also:
-
_ds
-
_locked
-
_whm
-
-
Constructor Details
-
DataSourceConnectionPool
Creates a DataSourceConnectionPool with the specified names and parameters- Parameters:
name- The name of the ConnectionPooljndiName- The JNDI name of theDataSourceobject to look up- Throws:
NamingException- If an error occurs during the creations, aNamingExceptionwill be thrown
-
-
Method Details
-
getConnection
Description copied from class:ConnectionPoolExtracts a Connection from the pool- Specified by:
getConnectionin classConnectionPool<DataSourcePooledConnection>- Parameters:
activity- The motivation / operation for which the extract request originates- Returns:
- The Connection extracted
- Throws:
SQLException- If there is an error during the extraction, anSQLExceptionwill be raised
-
releaseConnection
Description copied from class:ConnectionPoolReleases a Connection previously extracted withgetConnection()- Specified by:
releaseConnectionin classConnectionPool<DataSourcePooledConnection>- Parameters:
pc- The Connection to release- Throws:
SQLException- If there is an error during the release, anSQLExceptionwill be raised
-
locked
public int locked()Description copied from class:ConnectionPoolReturns the number of locked connections, i.e. the connections that are currently used by the application- Specified by:
lockedin classConnectionPool<DataSourcePooledConnection>- Returns:
- The number of currently locked connections
-
size
public int size()Description copied from class:ConnectionPoolReturns the size of the ConnectionPool- Specified by:
sizein classConnectionPool<DataSourcePooledConnection>- Returns:
- The number of Connection of this instance of ConnectionPool
-
getConnectionInfo
Description copied from class:ConnectionPoolReturns the informations about the connections of the pool- Specified by:
getConnectionInfoin classConnectionPool<DataSourcePooledConnection>- Returns:
- The List that contains the informations about the connections
-