public boolean isInProgressAndSameAs(TXStateInterface otherState) { return isInProgress() && otherState == this; }
@Override public final boolean isInProgress() { final TXState localState = this.localTXState; if (localState != null) { return localState.isInProgress() || (this.state.get() != State.CLOSED); } return (this.state.get() != State.CLOSED); }
protected void checkTX() { // Protect against the case where this instance was handed to a different // thread w/ or w/o a transaction // Protect against the case where the transaction associated with this entry // is not in progress // [sumedh] avoiding checking for LocalRegion's current TX since it involves // an expensive ThreadLocal lookup and it is okay to live with switching to // different thread as long as original transaction is alive //if (!this.myTX.isInProgressAndSameAs(this.localRegion.getTXState())) { if (!this.myTX.isInProgress()) { throw new IllegalTransactionStateException(LocalizedStrings .LocalRegion_REGIONENTRY_WAS_CREATED_WITH_TRANSACTION_THAT_IS_NO_LONGER_ACTIVE .toLocalizedString(this.myTX.getTransactionId())); } }
if (txState != null && txState.isInProgress()) { boolean added = false; txState.lockTXState(); if (txState.isInProgress()) { final TXRegionState[] regions = txState.getTXRegionStatesSnap(); for (TXRegionState txrs : regions) { if (txrs.region == rgn) { if (txState.isInProgress()) { txrss.add(txrs); txIdMap.put(txState.getTransactionId(),
getLogWriterI18n().info(LocalizedStrings.DEBUG, "Locking txState = " + txState); txState.lockTXState(); if (txState.isInProgress() && (txOrder = is.getFinishedTXOrder( txState.getTransactionId())) == 0) { inProgressTXStates.add(txrs); final TXId txId = txState.getTransactionId(); Object commitObj = null; if (txState.isInProgress() && (commitObj = txMgr .finishedTXStates.isTXCommitted(txId)) == null) {