com.jdbaccess.db
Class QueryConnPool
java.lang.Object
com.jdbaccess.db.QueryConnPool
public class QueryConnPool
- extends java.lang.Object
Manager of QueryConnections: holds for each connId the count of queryStatements. If
MAX_STATEMENTS is reached for a connection, then a new connection is fetched
from ConnPool
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
name
protected java.lang.String name
connPool
protected ConnPool connPool
QueryConnPool
public QueryConnPool(DataSource ds)
QueryConnPool
public QueryConnPool(DataSource ds,
int minCachePoolSize,
int maxCachePoolSize,
int maxOpenConnections)
setDebugModeOff
public void setDebugModeOff()
start
public void start()
throws ApplicationException
- Throws:
ApplicationException
end
public void end()
throws ApplicationException
- Throws:
ApplicationException
getConnection
public int getConnection()
throws ApplicationException
- get only a new connection from connPool if MAX_STATEMENTS for a connection
is reached else get same connection internal out of queryConnections (so
a query can use connections more than once).
- Returns:
-
- Throws:
ApplicationException
releaseConnection
public void releaseConnection(int connId)
throws ApplicationException
- Throws:
ApplicationException
deleteConnectionFromUsePool
public void deleteConnectionFromUsePool(int connId)
throws ApplicationException
- Throws:
ApplicationException
findConnection
public java.sql.Connection findConnection(int connId)