com.jdbaccess.db
Class ConnPool
java.lang.Object
com.jdbaccess.db.ConnPool
public class ConnPool
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
debugMode
protected boolean debugMode
ds
protected DataSource ds
name
protected java.lang.String name
minCachePoolSize
protected int minCachePoolSize
maxCachePoolSize
protected int maxCachePoolSize
maxOpenConnections
protected int maxOpenConnections
cachePool
protected java.util.Hashtable cachePool
usedPool
protected java.util.Hashtable usedPool
ConnPool
public ConnPool(DataSource ds)
ConnPool
public ConnPool(java.lang.String name,
DataSource ds)
ConnPool
public ConnPool(DataSource ds,
int minCachePoolSize,
int maxCachePoolSize,
int maxOpenConnections)
ConnPool
public ConnPool(java.lang.String name,
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 a new connection out of pool
- Returns:
- a new connection id
- Throws:
java.sql.SQLException
- TODO test if a connection is not ok anymore (repairCachePool)
ApplicationException
findConnection
public java.sql.Connection findConnection(int connId)
releaseConnection
public void releaseConnection(int connId)
throws ApplicationException
- release connection back to pool
- Parameters:
connId
-
- Throws:
java.sql.SQLException
ApplicationException
deleteConnectionFromUsePool
public void deleteConnectionFromUsePool(int connId)
throws ApplicationException
- Throws:
ApplicationException
commit
public void commit(int connId)
throws ApplicationException
- Throws:
ApplicationException
rollback
public void rollback(int connId)
throws ApplicationException
- Throws:
ApplicationException