Package javax.transaction

Examples of javax.transaction.TransactionManager.resume()


            cache.putForExternalRead(Fqn.fromString("/a/b/c"), "test", "test");
         }
         catch (Exception ignore) {
            ignore.printStackTrace();
         }
         tm.resume(t);
         print("get(): " + cache.get("/a/b/c", "test"));
         print(cache.exists("/a/b/c"));
         cache.put("/a/b/c", "test", "test");
         print(cache.exists("/a/b/c"));
         tm.commit();
View Full Code Here


      assert cache.getNode(AB) == null;
      tm.commit();

      assert cache.getNode(AB) == null;

      tm.resume(reader);
      assert cache.getNode(AB) != null;
      assert "v".equals(cache.get(AB, "k"));
      tm.commit();

      assert cache.getNode(AB) == null;
View Full Code Here

    protected abstract void manageTransaction() throws Throwable;

    protected void resumeTransaction(final Transaction transaction) throws Exception {
        final TransactionManager transactionManager = this.transactionsRepository.getTransactionManager();
        transactionManager.resume(transaction);
    }

}
View Full Code Here

    protected abstract void manageTransaction() throws Throwable;

    protected void resumeTransaction(final Transaction transaction) throws Exception {
        final TransactionManager transactionManager = this.transactionsRepository.getTransactionManager();
        transactionManager.resume(transaction);
    }
}
View Full Code Here

    private void createOrResumeUserTransaction(final UserTransactionID userTransactionID) throws Exception {
        final TransactionManager transactionManager = this.ejbRemoteTransactionsRepository.getTransactionManager();
        final Transaction alreadyCreatedTx = this.ejbRemoteTransactionsRepository.getUserTransaction(userTransactionID);
        if (alreadyCreatedTx != null) {
            // resume the already created tx
            transactionManager.resume(alreadyCreatedTx);
            return;
        }
        // begin a new user transaction and add it to the tx repository
        this.ejbRemoteTransactionsRepository.beginUserTransaction(userTransactionID);
    }
View Full Code Here

    private void createOrResumeXidTransaction(final XidTransactionID xidTransactionID) throws Exception {
        final TransactionManager transactionManager = this.ejbRemoteTransactionsRepository.getTransactionManager();
        final Transaction alreadyCreatedTx = this.ejbRemoteTransactionsRepository.getImportedTransaction(xidTransactionID);
        if (alreadyCreatedTx != null) {
            // resume the already created tx
            transactionManager.resume(alreadyCreatedTx);
        } else {
            // begin a new tx and add it to the tx repository
            // TODO: Fix the tx timeout (which currently is passed as 300 seconds)
            final Transaction newSubOrdinateTx = this.ejbRemoteTransactionsRepository.importTransaction(xidTransactionID, 300);
            // associate this tx with the thread
View Full Code Here

        } else {
            // begin a new tx and add it to the tx repository
            // TODO: Fix the tx timeout (which currently is passed as 300 seconds)
            final Transaction newSubOrdinateTx = this.ejbRemoteTransactionsRepository.importTransaction(xidTransactionID, 300);
            // associate this tx with the thread
            transactionManager.resume(newSubOrdinateTx);
        }
    }

}
View Full Code Here

                else
                    tm.commit();
                currentTx = null;
            }
            if (previousTx != null) {
                tm.resume(previousTx);
                previousTx = null;
            }
        } catch (InvalidTransactionException e) {
            throw new LocalTransactionException(e);
        } catch (HeuristicMixedException e) {
View Full Code Here

      }
      finally
      {
         if (toResume != null)
         {
            tm.resume(toResume);
         }
      }

      if (ok)
      {
View Full Code Here

        // Is the instance already associated with a transaction?
        Transaction tx = transaction;
        if (tx != null) {
            transaction = null;
            // then resume that transaction.
            tm.resume(tx);
        }
        try {
            return invocation.proceed();
        } catch (Throwable e) {
            throw this.handleException(invocation, e);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.