|
|||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||
java.lang.Objectorg.apache.commons.dbcp.AbandonedTrace
org.apache.commons.dbcp.DelegatingConnection
基盤となる Connection の委譲を行う実装です。
Connection インターフェイスの持つ全てのメソッドは、この
コンストラクタにて渡された
Connection がアクティブかどうかをチェックして
Connection の対応するメソッドを単純にコールします。
Connection の追跡とConnection を生成したコードのログを行うために AbandonedTrace を継承します。 Connection の追跡を行うことにより、AbandonedObjectPool がこの Connection をクローズできるようになります。 また、このコネクションのプールが保持しているコネクションを使い切りそうで removeAbandonedTimeout のチェックに引っかからなければ再利用することができます。
| フィールドの概要 | |
protected boolean |
_closed
|
protected Connection |
_conn
処理の委託先となる Connectionです。 |
| インタフェース java.sql.Connection から継承したフィールド |
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE |
| コンストラクタの概要 | |
DelegatingConnection(Connection c)
AbandonedObjectPool 内に保持されるこの Connection をトレースする Connection のラッパーを生成します。 |
|
DelegatingConnection(Connection c,
AbandonedConfig config)
生成されたままクローズされなかった Statement を Connection がクローズされた際にクローズすることのできる Connection のラッパーを生成します。 |
|
| メソッドの概要 | |
protected void |
activate()
|
protected void |
checkOpen()
|
void |
clearWarnings()
|
void |
close()
内部に保持するコネクションをクローズし、明示的にクローズされなかった Statement をクローズします。 |
void |
commit()
|
Statement |
createStatement()
|
Statement |
createStatement(int resultSetType,
int resultSetConcurrency)
|
boolean |
getAutoCommit()
|
String |
getCatalog()
|
Connection |
getDelegate()
内部に保持する Connection を返します。
|
Connection |
getInnermostDelegate()
内部に保持する Connection が DelegatingConnection でない場合にはその
Connection を返し、それ以外の場合には再帰的に getDelegate() をコールします。
|
DatabaseMetaData |
getMetaData()
|
int |
getTransactionIsolation()
|
Map |
getTypeMap()
|
SQLWarning |
getWarnings()
|
boolean |
isClosed()
|
boolean |
isReadOnly()
|
String |
nativeSQL(String sql)
|
protected void |
passivate()
|
CallableStatement |
prepareCall(String sql)
|
CallableStatement |
prepareCall(String sql,
int resultSetType,
int resultSetConcurrency)
|
PreparedStatement |
prepareStatement(String sql)
|
PreparedStatement |
prepareStatement(String sql,
int resultSetType,
int resultSetConcurrency)
|
void |
rollback()
|
void |
setAutoCommit(boolean autoCommit)
|
void |
setCatalog(String catalog)
|
void |
setDelegate(Connection c)
処理の委託先となる Connection を設定します。 |
void |
setReadOnly(boolean readOnly)
|
void |
setTransactionIsolation(int level)
|
void |
setTypeMap(Map map)
|
| クラス org.apache.commons.dbcp.AbandonedTrace から継承したメソッド |
addTrace, clearTrace, getConfig, getLastUsed, getTrace, printStackTrace, removeTrace, setLastUsed, setLastUsed, setStackTrace |
| クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| インタフェース java.sql.Connection から継承したメソッド |
createStatement, getHoldability, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, rollback, setHoldability, setSavepoint, setSavepoint |
| フィールドの詳細 |
protected boolean _closed
protected Connection _conn
Connectionです。
| コンストラクタの詳細 |
public DelegatingConnection(Connection c)
c - 全ての処理の委託先となる Connection
public DelegatingConnection(Connection c,
AbandonedConfig config)
c - 全ての処理の委託先となる Connection
config - 破棄されたオブジェクトをトレースするための設定
| メソッドの詳細 |
protected void activate()
protected void checkOpen()
throws SQLException
SQLException
public void clearWarnings()
throws SQLException
Connection 内の clearWarningsSQLException
public void close()
throws SQLException
Connection 内の closeSQLException
public void commit()
throws SQLException
Connection 内の commitSQLException
public Statement createStatement()
throws SQLException
Connection 内の createStatementSQLException
public Statement createStatement(int resultSetType,
int resultSetConcurrency)
throws SQLException
Connection 内の createStatementSQLException
public boolean getAutoCommit()
throws SQLException
Connection 内の getAutoCommitSQLException
public String getCatalog()
throws SQLException
Connection 内の getCatalogSQLExceptionpublic Connection getDelegate()
Connection を返します。
Connection
public Connection getInnermostDelegate()
Connection が DelegatingConnection でない場合にはその
Connection を返し、それ以外の場合には再帰的に getDelegate() をコールします。
従ってこのメソッドは DelegatingConnection ではない根本の処理の委託先となる Connection を返し、 DelegatingConnection の連鎖の中に処理の委託先が見つからない場合には null を返します。
このメソッドはネストした DelegatingConnection から
本来の Connection を取得したい場合に有用です。
public DatabaseMetaData getMetaData()
throws SQLException
Connection 内の getMetaDataSQLException
public int getTransactionIsolation()
throws SQLException
Connection 内の getTransactionIsolationSQLException
public Map getTypeMap()
throws SQLException
Connection 内の getTypeMapSQLException
public SQLWarning getWarnings()
throws SQLException
Connection 内の getWarningsSQLException
public boolean isClosed()
throws SQLException
Connection 内の isClosedSQLException
public boolean isReadOnly()
throws SQLException
Connection 内の isReadOnlySQLException
public String nativeSQL(String sql)
throws SQLException
Connection 内の nativeSQLSQLException
protected void passivate()
throws SQLException
SQLException
public CallableStatement prepareCall(String sql)
throws SQLException
Connection 内の prepareCallSQLException
public CallableStatement prepareCall(String sql,
int resultSetType,
int resultSetConcurrency)
throws SQLException
Connection 内の prepareCallSQLException
public PreparedStatement prepareStatement(String sql)
throws SQLException
Connection 内の prepareStatementSQLException
public PreparedStatement prepareStatement(String sql,
int resultSetType,
int resultSetConcurrency)
throws SQLException
Connection 内の prepareStatementSQLException
public void rollback()
throws SQLException
Connection 内の rollbackSQLException
public void setAutoCommit(boolean autoCommit)
throws SQLException
Connection 内の setAutoCommitSQLException
public void setCatalog(String catalog)
throws SQLException
Connection 内の setCatalogSQLExceptionpublic void setDelegate(Connection c)
Connection を設定します。
public void setReadOnly(boolean readOnly)
throws SQLException
Connection 内の setReadOnlySQLException
public void setTransactionIsolation(int level)
throws SQLException
Connection 内の setTransactionIsolationSQLException
public void setTypeMap(Map map)
throws SQLException
Connection 内の setTypeMapSQLException
|
|||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||