docs: public void commitTransaction() throws HibernateException
      {
          Transaction tx = threadTransaction.get();
          threadTransaction.set(null);
          if (tx != null && !tx.wasCommitted() && !tx.wasRolledBack())
          {
              tx.commit();
          }
      }