|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.codestudio.sql.PoolManConnection
A connection object that has a time value, so it knows how long it has to live, and it knows its pool, so it will automatically return to its pool if it isn't explicitly returned. It also knows its state -- whether it is in a pool or in use.
It encapsulates a true Connection implementation, which handles all the required JDBC methods by delegation.
PoolManConnection also sends error ConnectionEvents to its pool when encountering any SQLException.
Constructor Summary | |
PoolManConnection(java.sql.Connection con,
ObjectPool pool)
|
Method Summary | |
void |
addConnectionEventListener(javax.sql.ConnectionEventListener listener)
|
void |
clean()
Close any lingering Statements and ResutSets, and restore default values for isolation level and autocommit, committing or rolling back any existing unsaved changes. |
void |
clearWarnings()
|
void |
close()
Close the physical Connection. |
void |
closeAll()
|
void |
closeAllResources()
Disassociate resource references from this object |
void |
commit()
|
java.sql.Statement |
createStatement()
|
java.sql.Statement |
createStatement(int resultSetType,
int resultSetConcurrency)
|
boolean |
getAutoCommit()
|
java.lang.String |
getCatalog()
|
java.sql.Connection |
getConnection()
|
java.sql.DatabaseMetaData |
getMetaData()
|
java.sql.Connection |
getPhysicalConnection()
|
ObjectPool |
getPool()
Retrieve the pool containing this Object. |
int |
getTransactionIsolation()
|
java.util.Map |
getTypeMap()
|
java.sql.SQLWarning |
getWarnings()
|
boolean |
isClosed()
|
boolean |
isReadOnly()
|
java.lang.String |
nativeSQL(java.lang.String sql)
|
java.sql.CallableStatement |
prepareCall(java.lang.String sql)
|
java.sql.CallableStatement |
prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql)
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
|
void |
removeConnectionEventListener(javax.sql.ConnectionEventListener listener)
|
void |
removeOpenStatement(PoolManStatement s)
|
void |
rollback()
|
void |
sendCloseEvent()
|
void |
setAutoCommit(boolean autoCommit)
|
void |
setCatalog(java.lang.String catalog)
|
void |
setReadOnly(boolean readOnly)
|
void |
setTransactionIsolation(int level)
|
void |
setTypeMap(java.util.Map map)
|
java.lang.String |
toString()
|
void |
touch()
Update the locked table in ObjectPool to prevent the object from timing out. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public PoolManConnection(java.sql.Connection con, ObjectPool pool)
Method Detail |
public void closeAllResources()
PooledObject
closeAllResources
in interface PooledObject
public void closeAll()
public void removeOpenStatement(PoolManStatement s)
public void clean()
clean
in interface PooledObject
public void touch()
public ObjectPool getPool()
PooledObject
getPool
in interface PooledObject
com.codestudio.util.PooledObject
public java.sql.Connection getConnection() throws java.sql.SQLException
getConnection
in interface javax.sql.PooledConnection
public java.sql.Connection getPhysicalConnection()
public void addConnectionEventListener(javax.sql.ConnectionEventListener listener)
addConnectionEventListener
in interface javax.sql.PooledConnection
public void removeConnectionEventListener(javax.sql.ConnectionEventListener listener)
removeConnectionEventListener
in interface javax.sql.PooledConnection
public void sendCloseEvent()
public java.sql.Statement createStatement() throws java.sql.SQLException
public java.sql.PreparedStatement prepareStatement(java.lang.String sql) throws java.sql.SQLException
public java.sql.CallableStatement prepareCall(java.lang.String sql) throws java.sql.SQLException
public java.lang.String nativeSQL(java.lang.String sql) throws java.sql.SQLException
public void setAutoCommit(boolean autoCommit) throws java.sql.SQLException
public boolean getAutoCommit() throws java.sql.SQLException
public void commit() throws java.sql.SQLException
public void rollback() throws java.sql.SQLException
public void close() throws java.sql.SQLException
close
in interface javax.sql.PooledConnection
public boolean isClosed() throws java.sql.SQLException
public java.sql.DatabaseMetaData getMetaData() throws java.sql.SQLException
public void setReadOnly(boolean readOnly) throws java.sql.SQLException
public boolean isReadOnly() throws java.sql.SQLException
public void setCatalog(java.lang.String catalog) throws java.sql.SQLException
public java.lang.String getCatalog() throws java.sql.SQLException
public void setTransactionIsolation(int level) throws java.sql.SQLException
public int getTransactionIsolation() throws java.sql.SQLException
public java.sql.SQLWarning getWarnings() throws java.sql.SQLException
public void clearWarnings() throws java.sql.SQLException
public java.sql.Statement createStatement(int resultSetType, int resultSetConcurrency) throws java.sql.SQLException
public java.sql.PreparedStatement prepareStatement(java.lang.String sql, int resultSetType, int resultSetConcurrency) throws java.sql.SQLException
public java.sql.CallableStatement prepareCall(java.lang.String sql, int resultSetType, int resultSetConcurrency) throws java.sql.SQLException
public java.util.Map getTypeMap() throws java.sql.SQLException
public void setTypeMap(java.util.Map map) throws java.sql.SQLException
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |