public interface ConnectionProvider
ConnectionProvider allows for abstracting the handling of
Connection lifecycles outside of jOOQ, injecting
behaviour into jOOQ's internals. jOOQ will try to acquire a new JDBC
Connection from the connection provider as early as needed, and will
release it as early as possible.
TransactionProvider implementations may choose to influence
ConnectionProvider behaviour, e.g. by acquiring connections upon
TransactionProvider.begin(TransactionContext) and by releasing
connections only upon
Connection acquire() throws DataAccessException
This method is called by jOOQ exactly once per execution lifecycle, i.e.
ExecuteContext. Implementations may freely chose, whether
subsequent calls to this method:
jOOQ will guarantee that every acquired connection is released through
release(Connection) exactly once.
DataAccessException- If anything went wrong while acquiring a connection
void release(Connection connection) throws DataAccessException
jOOQ will guarantee that every acquired connection is released exactly once.
Copyright © 2017. All Rights Reserved.