org.springframework.data.jdbc.support.oracle
Class ProxyConnectionPreparer
java.lang.Object
org.springframework.data.jdbc.support.oracle.ProxyConnectionPreparer
- All Implemented Interfaces:
- ConnectionPreparer
public class ProxyConnectionPreparer
- extends Object
- implements ConnectionPreparer
A ConnectionPreparer that will delegate to a ConnectionContextProvider to obtaing the current user name
to be used for the proxy connection.
- Since:
- 1.0
- Author:
- Thomas Risberg
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ProxyConnectionPreparer
public ProxyConnectionPreparer()
setContextProvider
public void setContextProvider(ConnectionContextProvider contextProvider)
setJdbcExtractor
public void setJdbcExtractor(NativeJdbcExtractor jdbcExtractor)
prepare
public Connection prepare(Connection connection)
- Specified by:
prepare in interface ConnectionPreparer
getUserNameConnectionProxyWrapper
protected Connection getUserNameConnectionProxyWrapper(Connection target)
- Wrap the given Connection with a proxy that delegates every method call to it
and resets user name proxy for close calls.
- Parameters:
target - the original Connection to wrap
- Returns:
- the wrapped Connection