Package net.officefloor.jdbc.pool
Interface ThreadLocalJdbcConnectionPool.PooledConnectionContext
-
- All Superinterfaces:
java.lang.reflect.InvocationHandler
- Enclosing class:
- ThreadLocalJdbcConnectionPool
public static interface ThreadLocalJdbcConnectionPool.PooledConnectionContext extends java.lang.reflect.InvocationHandler
Context for the pooledConnection
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ThreadLocalJdbcConnectionPool.ConnectionReference
getConnectionReference()
Obtains theThreadLocalJdbcConnectionPool.ConnectionReference
.ThreadLocalJdbcConnectionPool
getPool()
Obtains theThreadLocalJdbcConnectionPool
.java.sql.Connection
getRealConnection()
Obtains the realConnection
.void
setAutoCommit(ThreadLocalJdbcConnectionPool.ConnectionReference reference, boolean isAutoCommit)
Sets auto-commit on theConnection
.
-
-
-
Method Detail
-
getRealConnection
java.sql.Connection getRealConnection()
Obtains the realConnection
.- Returns:
- The real
Connection
ornull
if no realConnection
.
-
getConnectionReference
ThreadLocalJdbcConnectionPool.ConnectionReference getConnectionReference() throws java.sql.SQLException
Obtains theThreadLocalJdbcConnectionPool.ConnectionReference
.- Returns:
ThreadLocalJdbcConnectionPool.ConnectionReference
.- Throws:
java.sql.SQLException
- If fails to obtain theThreadLocalJdbcConnectionPool.ConnectionReference
.
-
setAutoCommit
void setAutoCommit(ThreadLocalJdbcConnectionPool.ConnectionReference reference, boolean isAutoCommit) throws java.sql.SQLException
Sets auto-commit on theConnection
.- Parameters:
reference
-ThreadLocalJdbcConnectionPool.ConnectionReference
to theConnection
.isAutoCommit
- Indicates whether setting/unsetting auto-commit.- Throws:
java.sql.SQLException
- If fails to set auto-commit.
-
getPool
ThreadLocalJdbcConnectionPool getPool()
Obtains theThreadLocalJdbcConnectionPool
.- Returns:
ThreadLocalJdbcConnectionPool
.
-
-