com.jdbaccess.db
Class QueryConnPool

java.lang.Object
  extended by 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


Field Summary
protected  ConnPool connPool
           
protected  java.lang.String name
           
 
Constructor Summary
QueryConnPool(DataSource ds)
           
QueryConnPool(DataSource ds, int minCachePoolSize, int maxCachePoolSize, int maxOpenConnections)
           
 
Method Summary
 void deleteConnectionFromUsePool(int connId)
           
 void end()
           
 java.sql.Connection findConnection(int connId)
           
 int getConnection()
          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).
 void releaseConnection(int connId)
           
 void setDebugModeOff()
           
 void start()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected java.lang.String name

connPool

protected ConnPool connPool
Constructor Detail

QueryConnPool

public QueryConnPool(DataSource ds)

QueryConnPool

public QueryConnPool(DataSource ds,
                     int minCachePoolSize,
                     int maxCachePoolSize,
                     int maxOpenConnections)
Method Detail

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)