类 UserSuppliedConnectionProviderImpl
- java.lang.Object
-
- org.hibernate.engine.jdbc.connections.internal.UserSuppliedConnectionProviderImpl
-
- 所有已实现的接口:
Serializable,ConnectionProvider,Service,Wrapped
public class UserSuppliedConnectionProviderImpl extends Object implements ConnectionProvider
An implementation of theConnectionProviderinterface that simply throws an exception when a connection is requested, the assumption being that the application is responsible for handing the connection to use to the session- 作者:
- Gavin King, Steve Ebersole
- 另请参阅:
- 序列化表格
-
-
构造器概要
构造器 构造器 说明 UserSuppliedConnectionProviderImpl()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidcloseConnection(Connection conn)Release a connection from Hibernate use.ConnectiongetConnection()Obtains a connection for Hibernate use according to the underlying strategy of this provider.booleanisUnwrappableAs(Class unwrapType)Can this wrapped service be unwrapped as the indicated type?booleansupportsAggressiveRelease()Does this connection provider support aggressive release of JDBC connections and re-acquisition of those connections (if need be) later?<T> Tunwrap(Class<T> unwrapType)Unproxy the service proxy
-
-
-
方法详细资料
-
isUnwrappableAs
public boolean isUnwrappableAs(Class unwrapType)
从接口复制的说明:WrappedCan this wrapped service be unwrapped as the indicated type?- 指定者:
isUnwrappableAs在接口中Wrapped- 参数:
unwrapType- The type to check.- 返回:
- True/false.
-
getConnection
public Connection getConnection() throws SQLException
从接口复制的说明:ConnectionProviderObtains a connection for Hibernate use according to the underlying strategy of this provider.- 指定者:
getConnection在接口中ConnectionProvider- 返回:
- The obtained JDBC connection
- 抛出:
SQLException- Indicates a problem opening a connection
-
closeConnection
public void closeConnection(Connection conn) throws SQLException
从接口复制的说明:ConnectionProviderRelease a connection from Hibernate use.- 指定者:
closeConnection在接口中ConnectionProvider- 参数:
conn- The JDBC connection to release- 抛出:
SQLException- Indicates a problem closing the connection
-
supportsAggressiveRelease
public boolean supportsAggressiveRelease()
从接口复制的说明:ConnectionProviderDoes this connection provider support aggressive release of JDBC connections and re-acquisition of those connections (if need be) later? This is used in conjunction withAvailableSettings.RELEASE_CONNECTIONSto aggressively release JDBC connections. However, the configured ConnectionProvider must support re-acquisition of the same underlying connection for that semantic to work. Typically, this is only true in managed environments where a container tracks connections by transaction or thread. Note that JTA semantic depends on the fact that the underlying connection provider does support aggressive release.- 指定者:
supportsAggressiveRelease在接口中ConnectionProvider- 返回:
trueif aggressive releasing is supported;falseotherwise.
-
-