try {
state.preparing();
if (state.isRollbackReceived()) {
//this means that rollback has already been received
transactionTable.removeRemoteTransaction(command.getGlobalTransaction());
throw new CacheException("Cannot prepare transaction" + command.getGlobalTransaction().globalId() +
". it was already marked as rollback");
}
if (state.isCommitReceived()) {
log.tracef("Transaction %s marked for commit, skipping the write skew check and forcing 1PC",