if (Transaction.isRollbacked()) {
String msg = "The transaction is already rollbacked, you can not commit a transaction "
+ "already rollbacked, nested depth: " + Transaction.getNestedDepth() + ".";
log.debug(msg);
Transaction.decNestedDepth();
throw new BillingException(msg);
}
Connection conn = Transaction.getConnection();
try {
conn.commit();
} catch (SQLException e) {
String msg = "Failed to commit transaction. " + e.getMessage();
log.error(msg, e);
throw new BillingException(msg, e);
} finally {
endTransaction();
Transaction.decNestedDepth();
}