public class PreparedStatementProxyConnectionProvider extends ConnectionProviderDelegate
ConnectionProvider
extends any other ConnectionProvider that would be used by default taken the current configuration properties, and it
intercept the underlying PreparedStatement
method calls.Constructor and Description |
---|
PreparedStatementProxyConnectionProvider(PreparedStatementObserver preparedStatementObserver) |
Modifier and Type | Method and Description |
---|---|
protected java.sql.Connection |
actualConnection() |
void |
clear()
Clears the recorded PreparedStatements.
|
void |
closeConnection(java.sql.Connection conn)
Release a connection from Hibernate use.
|
java.sql.Connection |
getConnection()
Obtains a connection for Hibernate use according to the underlying strategy of this provider.
|
void |
stop()
Stop phase notification
|
configure, injectServices, isUnwrappableAs, supportsAggressiveRelease, unwrap
public PreparedStatementProxyConnectionProvider(PreparedStatementObserver preparedStatementObserver)
protected java.sql.Connection actualConnection() throws java.sql.SQLException
java.sql.SQLException
public java.sql.Connection getConnection() throws java.sql.SQLException
ConnectionProvider
getConnection
in interface ConnectionProvider
getConnection
in class ConnectionProviderDelegate
java.sql.SQLException
- Indicates a problem opening a connectionpublic void closeConnection(java.sql.Connection conn) throws java.sql.SQLException
ConnectionProvider
closeConnection
in interface ConnectionProvider
closeConnection
in class ConnectionProviderDelegate
conn
- The JDBC connection to releasejava.sql.SQLException
- Indicates a problem closing the connectionpublic void stop()
Stoppable
stop
in interface Stoppable
stop
in class ConnectionProviderDelegate
public void clear()
Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.