code: private static boolean isDone() throws SystemException
     {
        switch (userTransaction.getStatus()) {
        case Status.STATUS_PREPARING:
        case Status.STATUS_PREPARED:
        case Status.STATUS_COMMITTING:
        case Status.STATUS_COMMITTED:
        case Status.STATUS_ROLLING_BACK:
        case Status.STATUS_ROLLEDBACK:
           return true;
        }
        return false;
     }
docs: See https://github.com/bitronix/btm/blob/1072c3042c8b65ecf17ded88115631e061f23333/btm/src/main/java/bitronix/tm/BitronixTransaction.java#L580
  for reference.
  
  @return whether the current transaction is done or not
  @throws SystemException if an exception occurs