public class DriverManagerAdapter extends Object
| Modifier and Type | Field and Description |
|---|---|
protected String |
contextName |
protected HandleableException |
handlerException |
protected org.slf4j.Logger |
LOG |
| Constructor and Description |
|---|
DriverManagerAdapter(Properties props,
String contextName) |
| Modifier and Type | Method and Description |
|---|---|
void |
close(CallableStatement call)
null-safe close CallableStatement. |
void |
close(ConnectionAdapter conn)
null-safe close connection. |
void |
close(PreparedStatement stmt)
null-safe close PreparedStatement. |
void |
close(ResultSet rs)
null-safe close ResultSet. |
void |
close(Statement stmt)
null-safe close Statement. |
String |
getContextName()
Name from repository context
|
Transactional |
getTransactionManager()
Create new Transaction Manager for JDBC transactions
|
ConnectionAdapter |
open()
Attempts to establish a connection to the database
|
ConnectionAdapter |
open(Isolation isolation)
Attempts to establish a connection to the database with specific isolation
|
protected void |
setIsolation(Connection conn,
Isolation isolation) |
protected boolean |
supportsTransactionIsolationLevel(Connection conn,
Isolation isolation) |
ConnectionFactory |
with(HandleableException handlerException) |
protected transient org.slf4j.Logger LOG
protected final String contextName
protected HandleableException handlerException
public DriverManagerAdapter(Properties props, String contextName)
public ConnectionAdapter open()
RepositoryException - if cannot establish a connectionpublic ConnectionAdapter open(Isolation isolation)
isolation - transaction level for connectionRepositoryException - if cannot establish a connectionpublic ConnectionFactory with(HandleableException handlerException)
with in interface ConnectionFactorypublic String getContextName()
ConnectionFactorygetContextName in interface ConnectionFactorypublic Transactional getTransactionManager()
ConnectionFactorygetTransactionManager in interface ConnectionFactorypublic void close(ConnectionAdapter conn)
ConnectionFactorynull-safe close connection.
Throws SQLException is logged as warning.close in interface ConnectionFactoryconn - connection to closepublic void close(PreparedStatement stmt)
ConnectionFactorynull-safe close PreparedStatement.
Throws SQLException is logged as warning.close in interface ConnectionFactorystmt - statement to closepublic void close(Statement stmt)
ConnectionFactorynull-safe close Statement.
Throws SQLException is logged as warning.close in interface ConnectionFactorystmt - statement to closepublic void close(ResultSet rs)
ConnectionFactorynull-safe close ResultSet.
Throws SQLException is logged as warning.close in interface ConnectionFactoryrs - ResultSet to closepublic void close(CallableStatement call)
ConnectionFactorynull-safe close CallableStatement.
Throws SQLException is logged as warning.close in interface ConnectionFactorycall - CallableStatement to closeprotected void setIsolation(Connection conn, Isolation isolation)
protected boolean supportsTransactionIsolationLevel(Connection conn, Isolation isolation)
Copyright © 2012–2020 jkniv, copyleft code. All rights reserved.