}
@Override
public void close() {
if (!active) {
throw new JdbcChannelException("Inactive transaction");
}
count--;
LOGGER.debug("Tx count-close: " + count + ", rollback: " + rollback);
if (count == 0) {
active = false;
try {
if (rollback) {
LOGGER.info("Attempting transaction roll-back");
connection.rollback();
} else {
LOGGER.info("Attempting transaction commit");
connection.commit();
}
} catch (SQLException ex) {
throw new JdbcChannelException("Unable to finalize transaction", ex);
} finally {
if (connection != null) {
// Log Warnings
try {
SQLWarning warning = connection.getWarnings();