public class ConnectionWrapper extends ConnectionAdapter
Title: 常用代码打包
Description: An implementation of the Connection interface that wraps an underlying Connection object. It releases the connection back to a connection pool when Connection.close() is called.
Copyright: Copyright (c) 2006
Company: www.justdos.net
| 限定符和类型 | 字段和说明 |
|---|---|
boolean |
checkedout |
long |
checkinTime |
long |
createTime |
Exception |
exception |
boolean |
hasLoggedException |
long |
lockTime |
protected static Log |
log
Commons Logging instance.
|
ConnectionPool |
pool |
connection| 构造器和说明 |
|---|
ConnectionWrapper(Connection connection,
ConnectionPool pool) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close()
Instead of closing the underlying connection, we simply release
it back into the pool.
|
boolean |
isCheckedOut() |
void |
setConnection(Connection connection) |
String |
toString() |
abort, clearWarnings, commit, createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStatement, createStatement, createStatement, createStruct, getAutoCommit, getCatalog, getClientInfo, getClientInfo, getHoldability, getMetaData, getNetworkTimeout, getSchema, getTransactionIsolation, getTypeMap, getWarnings, isClosed, isReadOnly, isValid, isWrapperFor, nativeSQL, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, rollback, rollback, setAutoCommit, setCatalog, setClientInfo, setClientInfo, setHoldability, setNetworkTimeout, setReadOnly, setSavepoint, setSavepoint, setSchema, setTransactionIsolation, setTypeMap, unwrapprotected static Log log
public ConnectionPool pool
public boolean checkedout
public long createTime
public long lockTime
public long checkinTime
public Exception exception
public boolean hasLoggedException
public ConnectionWrapper(Connection connection, ConnectionPool pool)
public void setConnection(Connection connection)
public void close()
throws SQLException
close 在接口中 AutoCloseableclose 在接口中 Connectionclose 在类中 ConnectionAdapterSQLExceptionpublic String toString()
toString 在类中 ConnectionAdapterpublic boolean isCheckedOut()
Copyright © 2023 onecode. All rights reserved.