use of org.jooq.ConnectionProvider in project jOOQ by jOOQ.
the class DefaultConfiguration method connectionProvider.
// -------------------------------------------------------------------------
// XXX: Getters
// -------------------------------------------------------------------------
@Override
public final ConnectionProvider connectionProvider() {
// [#3229] [#5377] If we're currently in a transaction, return that transaction's
// local DefaultConnectionProvider, not the one from this configuration
TransactionProvider tp = transactionProvider();
ConnectionProvider transactional = tp instanceof ThreadLocalTransactionProvider ? ((ThreadLocalTransactionProvider) tp).localConnectionProvider : (ConnectionProvider) data(DATA_DEFAULT_TRANSACTION_PROVIDER_CONNECTION);
return transactional != null ? transactional : connectionProvider != null ? connectionProvider : new NoConnectionProvider();
}
Aggregations