|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdbpool.DBConnectionMgr
Manages a java.sql.Connection pool.
Constructor Summary | |
DBConnectionMgr()
|
Method Summary | |
void |
finalize()
Closes all connections and clears out the connection pool |
void |
freeConnection(java.sql.Connection c)
Marks a flag in the ConnectionObject to indicate this connection is no longer in use |
void |
freeConnection(java.sql.Connection c,
java.sql.PreparedStatement p)
|
void |
freeConnection(java.sql.Connection c,
java.sql.PreparedStatement p,
java.sql.ResultSet r)
|
void |
freeConnection(java.sql.Connection c,
java.sql.Statement s)
|
void |
freeConnection(java.sql.Connection c,
java.sql.Statement s,
java.sql.ResultSet r)
|
java.sql.Connection |
getConnection()
Returns an unused existing or new connection. |
int |
getConnectionCount()
Returns a count of open connections |
java.util.Vector |
getConnectionList()
Returns a Vector of java.sql.Connection objects |
static DBConnectionMgr |
getInstance()
Use this method to set the maximum number of open connections before unused connections are closed. |
void |
releaseFreeConnections()
Closes all connections and clears out the connection pool |
void |
removeConnection(java.sql.Connection c)
Marks a flag in the ConnectionObject to indicate this connection is no longer in use |
void |
setEnableTrace(boolean enable)
|
void |
setInitOpenConnections(int count)
Opens specified "count" of connections and adds them to the existing pool |
void |
setOpenConnectionCount(int count)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DBConnectionMgr()
Method Detail |
public static DBConnectionMgr getInstance()
public void setOpenConnectionCount(int count)
public void setEnableTrace(boolean enable)
public java.util.Vector getConnectionList()
public void setInitOpenConnections(int count) throws java.sql.SQLException
java.sql.SQLException
public int getConnectionCount()
public java.sql.Connection getConnection() throws java.lang.Exception
java.lang.Exception
public void freeConnection(java.sql.Connection c)
public void freeConnection(java.sql.Connection c, java.sql.PreparedStatement p, java.sql.ResultSet r)
public void freeConnection(java.sql.Connection c, java.sql.Statement s, java.sql.ResultSet r)
public void freeConnection(java.sql.Connection c, java.sql.PreparedStatement p)
public void freeConnection(java.sql.Connection c, java.sql.Statement s)
public void removeConnection(java.sql.Connection c)
public void releaseFreeConnections()
public void finalize()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |