/** Roll back the transaction associated with the current * thread. When this method completes, the thread is no longer * associated with a transaction. */ public final void rollback() { rollback(getTXState(), null, false); }
@Override public void run() { txMgrImpl.begin(); try { exprReg.put("key0", putVal); txMgrImpl.commit(); fail("Expected ConflictException!"); } catch (ConflictException expected) { txMgrImpl.rollback(); } } };
@Override protected boolean operateOnTx(TXId txId,DistributionManager dm) { GemFireCacheImpl cache = GemFireCacheImpl.getInstance(); if (cache == null) { throw new CacheClosedException(LocalizedStrings.CacheFactory_A_CACHE_HAS_NOT_YET_BEEN_CREATED.toLocalizedString()); } TXManagerImpl txMgr = cache.getTXMgr(); if (logger.isDebugEnabled()) { logger.debug("TX: Rolling back :{}", txId); } try { if (!txMgr.isHostedTxRecentlyCompleted(txId)) { txMgr.rollback(); } } finally { txMgr.removeHostedTXState(txId); } return true; }
txMgr.rollback(); rollbackSuccessful = true;
public Object call() throws Exception { TXManagerImpl mgr = getGemfireCache().getTxManager(); Region r = getCache().getRegion(regionName); Customer cust = new Customer(1, "cust1"); r.put(key, cust); mgr.begin(); cust.setName(""); try { r.put(key, cust); fail("exception not thrown"); } catch (UnsupportedOperationInTransactionException expected) { } mgr.rollback(); return null; } });
if (txState != null) { txId = txState.getTxId(); txMgr.rollback(); sendRollbackReply(msg, servConn);
public Object call() throws Exception { TXManagerImpl mgr = getGemfireCache().getTxManager(); TXStateInterface tx = mgr.internalSuspend(); assertNotNull(tx); mgr.resume(tx); if (commit) { mgr.commit(); TXManagerImpl.waitForPendingCommitForTest(); } else { mgr.rollback(); } return null; } });
txManager.rollback(); } else if ((context = TXManagerImpl.currentTXContext()) != null) { context.clearTXStateAll();
txMgr.rollback(); switch (op) { case PUTALL:
public Object call() throws Exception { TXManagerImpl mgr = getGemfireCache().getTxManager(); mgr.rollback(); LocalRegion custRegion = (LocalRegion)getCache().getRegion(CUSTOMER); LocalRegion orderRegion = (LocalRegion)getCache().getRegion(ORDER); for (int index = 0; index < 10; ++index) { final CustId custId = new CustId(index); if (index < 5) { assertEquals(new Customer("customer" + index, "address" + index), custRegion.get(custId)); assertEquals(new Order("order" + index), orderRegion.getEntry(new OrderId(index, custId)).getValue()); } else { assertNull(custRegion.get(custId)); assertNull(orderRegion.getEntry(new OrderId(index, custId))); } } return null; } });
} catch (ConflictException ce) { mImp.rollback();
this.txManager.rollback(tx, this.connectionID, false); setTXState(null);
try { if (txState != null) { txMgr.rollback(txState, callbackArg, true /*remote to coordinator*/);
this.txManager.rollback(tx, this.connectionID, false); setTXState(null);
txManager.rollback();
txManager.rollback();
TXStateInterface gfTx = context != null ? context.getSnapshotTXState() : null; if ((tx.isSnapshot() && implicitSnapshotTxStarted) || (tx != gfTx && !tx.isSnapshot())) { this.txManager.rollback(tx, this.connectionID, false); if (tx.isSnapshot() && implicitSnapshotTxStarted) { implicitSnapshotTxStarted = false;
if (oldTX != null) { try { txManager.rollback(oldTX, null, false); } catch (TransactionException ignored) {
txManager.rollback();