| Method from org.apache.commons.dbcp.cpdsadapter.ConnectionImpl Detail: |
public void clearWarnings() throws SQLException {
assertOpen();
connection.clearWarnings();
}
|
public void close() throws SQLException {
assertOpen();
isClosed = true;
pooledConnection.notifyListeners();
}
Marks the Connection as closed, and notifies the pool that the
pooled connection is available.
In accordance with the jdbc specification this Connection cannot
be used after closed() is called. Any further usage will result in an
SQLException. |
public void commit() throws SQLException {
assertOpen();
connection.commit();
}
|
public Statement createStatement() throws SQLException {
assertOpen();
return connection.createStatement();
}
|
public Statement createStatement(int resultSetType,
int resultSetConcurrency) throws SQLException {
assertOpen();
return connection
.createStatement(resultSetType, resultSetConcurrency);
}
|
public Statement createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability) throws SQLException {
assertOpen();
return connection.createStatement(resultSetType, resultSetConcurrency,
resultSetHoldability);
}
|
protected void finalize() throws Throwable {
if (!isClosed) {
// If this DBConnection object is finalized while linked
// to a ConnectionPool, it means that it was taken from a pool
// and not returned. We log this fact, close the underlying
// Connection, and return it to the ConnectionPool.
throw new SQLException("A ConnectionImpl was finalized "
+ "without being closed which will cause leakage of "
+ " PooledConnections from the ConnectionPool.");
}
}
The finalizer helps prevent ConnectionPool leakage. |
public boolean getAutoCommit() throws SQLException {
assertOpen();
return connection.getAutoCommit();
}
|
public String getCatalog() throws SQLException {
assertOpen();
return connection.getCatalog();
}
|
public int getHoldability() throws SQLException {
assertOpen();
return connection.getHoldability();
}
|
public DatabaseMetaData getMetaData() throws SQLException {
assertOpen();
return connection.getMetaData();
}
|
public int getTransactionIsolation() throws SQLException {
assertOpen();
return connection.getTransactionIsolation();
}
|
public Map getTypeMap() throws SQLException {
assertOpen();
return connection.getTypeMap();
}
|
public SQLWarning getWarnings() throws SQLException {
assertOpen();
return connection.getWarnings();
}
|
public boolean isClosed() {
return isClosed;
}
Returns true after close() is called, and false prior to that. |
public boolean isReadOnly() throws SQLException {
assertOpen();
return connection.isReadOnly();
}
|
public String nativeSQL(String sql) throws SQLException {
assertOpen();
return connection.nativeSQL(sql);
}
|
public CallableStatement prepareCall(String sql) throws SQLException {
assertOpen();
return connection.prepareCall(sql);
}
|
public CallableStatement prepareCall(String sql,
int resultSetType,
int resultSetConcurrency) throws SQLException {
assertOpen();
return connection.prepareCall(sql, resultSetType, resultSetConcurrency);
}
|
public CallableStatement prepareCall(String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability) throws SQLException {
assertOpen();
return connection.prepareCall(sql, resultSetType,
resultSetConcurrency,
resultSetHoldability);
}
|
public PreparedStatement prepareStatement(String sql) throws SQLException {
assertOpen();
return pooledConnection.prepareStatement(sql);
}
|
public PreparedStatement prepareStatement(String sql,
int autoGeneratedKeys) throws SQLException {
assertOpen();
return connection.prepareStatement(sql, autoGeneratedKeys);
}
|
public PreparedStatement prepareStatement(String sql,
int[] columnIndexes) throws SQLException {
assertOpen();
return connection.prepareStatement(sql, columnIndexes);
}
|
public PreparedStatement prepareStatement(String sql,
String[] columnNames) throws SQLException {
assertOpen();
return connection.prepareStatement(sql, columnNames);
}
|
public PreparedStatement prepareStatement(String sql,
int resultSetType,
int resultSetConcurrency) throws SQLException {
assertOpen();
return pooledConnection
.prepareStatement(sql, resultSetType, resultSetConcurrency);
}
|
public PreparedStatement prepareStatement(String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability) throws SQLException {
assertOpen();
return connection.prepareStatement(sql, resultSetType,
resultSetConcurrency,
resultSetHoldability);
}
|
public void releaseSavepoint(Savepoint savepoint) throws SQLException {
assertOpen();
connection.releaseSavepoint(savepoint);
}
|
public void rollback() throws SQLException {
assertOpen();
connection.rollback();
}
|
public void rollback(Savepoint savepoint) throws SQLException {
assertOpen();
connection.rollback(savepoint);
}
|
public void setAutoCommit(boolean b) throws SQLException {
assertOpen();
connection.setAutoCommit(b);
}
|
public void setCatalog(String catalog) throws SQLException {
assertOpen();
connection.setCatalog(catalog);
}
|
public void setHoldability(int holdability) throws SQLException {
assertOpen();
connection.setHoldability(holdability);
}
|
public void setReadOnly(boolean readOnly) throws SQLException {
assertOpen();
connection.setReadOnly(readOnly);
}
|
public Savepoint setSavepoint() throws SQLException {
assertOpen();
return connection.setSavepoint();
}
|
public Savepoint setSavepoint(String name) throws SQLException {
assertOpen();
return connection.setSavepoint(name);
}
|
public void setTransactionIsolation(int level) throws SQLException {
assertOpen();
connection.setTransactionIsolation(level);
}
|
public void setTypeMap(Map map) throws SQLException {
assertOpen();
connection.setTypeMap(map);
}
|