109110111112113114115116117118119
if (state != ACTIVE) { throw new TransactionNotActiveException("Transaction is not active"); } checkThread(); checkTimeout(); invoke(new PrepareTransactionRequest()); state = PREPARED; } catch (Exception e) { state = ROLLING_BACK; closeConnection(); throw ExceptionUtil.rethrow(e);