public void resume(Transaction tx) throws IllegalStateException, SystemException { assertTmOk("tx resume"); Thread thread = Thread.currentThread(); if (txThreadMap.get(thread) != null) { throw new IllegalStateException("Transaction already associated"); } if (tx != null) { TransactionImpl txImpl = (TransactionImpl) tx; if (txImpl.getStatus() != Status.STATUS_NO_TRANSACTION) { if (txImpl.isActive()) { throw new IllegalStateException(txImpl + " already active"); } txImpl.markAsActive(); txThreadMap.put(thread, txImpl); } // generate pro-active event resume } }