Package org.springframework.transaction

Examples of org.springframework.transaction.TransactionStatus


        // NESTED transactions get whether to commit or rollback from their outermost transaction
        // so ignore them unless they are the only transaction on the stack (in which case they
        // should be flagged as INDEPENDENT transaction, but it doesn't hurt to check)
        // TF:27/04/2008:Changed the check of the size to 0, as we've popped the top of the stack
        if (transactionData.type != TransactionType.NESTED || currentTransactions.size() == 0) {
            TransactionStatus currentStatus = transactionData.getStatus();
            PlatformTransactionManager aTxn = transactionData.getManager();
            if (aTxn != null && currentStatus != null) {
                if (transactionData.rolledBack) {
                    // Something has previously rolled back, forcing this transaction to rollback
                  if (_log.isDebugEnabled()) {
View Full Code Here


  /**
   * Register jobs and triggers (within a transaction, if possible).
   */
  protected void registerJobsAndTriggers() throws SchedulerException {
    TransactionStatus transactionStatus = null;
    if (this.transactionManager != null) {
      transactionStatus = this.transactionManager.getTransaction(new DefaultTransactionDefinition());
    }
    try {

View Full Code Here

          return joinpointIdentification;
        }
      };
    }

    TransactionStatus status = null;
    if (txAttr != null) {
      PlatformTransactionManager tm = getTransactionManager();
      if (tm != null) {
        status = tm.getTransaction(txAttr);
      }
View Full Code Here

            // under spring. So we try to join the existing one, and if we can't, it's not active
            // (We could inspect the transaction data stack for the thread, but this isn't guaranteed
            // if the user has created transactions for themselves)
            try {
                PlatformTransactionManager qq_txn1 = pDataSource.getTransactionManager();
                TransactionStatus aTxnStatus = qq_txn1.getTransaction(new DefaultTransactionDefinition(TransactionDefinition.PROPAGATION_MANDATORY));
                qq_txn1.commit(aTxnStatus);
                return true;
            }
            catch (Exception e) {
                return false;
View Full Code Here

        // NESTED transactions get whether to commit or rollback from their outermost transaction
        // so ignore them unless they are the only transaction on the stack (in which case they
        // should be flagged as INDEPENDENT transaction, but it doesn't hurt to check)
        // TF:27/04/2008:Changed the check of the size to 0, as we've popped the top of the stack
        if (transactionData.type != TransactionType.NESTED || currentTransactions.size() == 0) {
            TransactionStatus currentStatus = transactionData.getStatus();
            PlatformTransactionManager aTxn = transactionData.getManager();
            if (currentStatus != null && aTxn != null) {
                _log.debug("Rollback Transaction: " + transactionData);
                aTxn.rollback(currentStatus);
            }
View Full Code Here

        // NESTED transactions get whether to commit or rollback from their outermost transaction
        // so ignore them unless they are the only transaction on the stack (in which case they
        // should be flagged as INDEPENDENT transaction, but it doesn't hurt to check)
        // TF:27/04/2008:Changed the check of the size to 0, as we've popped the top of the stack
        if (transactionData.type != TransactionType.NESTED || currentTransactions.size() == 0) {
            TransactionStatus currentStatus = transactionData.getStatus();
            PlatformTransactionManager aTxn = transactionData.getManager();
            if (aTxn != null && currentStatus != null) {
                if (transactionData.rolledBack) {
                    // Something has previously rolled back, forcing this transaction to rollback
                  if (_log.isDebugEnabled()) {
View Full Code Here

  /**
   *
   */
  public static void setup(Locale locale, WikiUser user, String username,
      String encryptedPassword) throws DataAccessException, WikiException {
    TransactionStatus status = null;
    try {
      // set up tables
      WikiDatabase.setupDefaultVirtualWiki();
      WikiDatabase.setupRoles();
      WikiDatabase.setupGroups();
View Full Code Here

  protected boolean receiveAndExecute(Object invoker, Session session, MessageConsumer consumer)
      throws JMSException {

    if (this.transactionManager != null) {
      // Execute receive within transaction.
      TransactionStatus status = this.transactionManager.getTransaction(this.transactionDefinition);
      boolean messageReceived = true;
      try {
        messageReceived = doReceiveAndExecute(invoker, session, consumer, status);
      }
      catch (JMSException ex) {
View Full Code Here

          return joinpointIdentification;
        }
      };
    }

    TransactionStatus status = null;
    if (txAttr != null) {
      PlatformTransactionManager tm = getTransactionManager();
      if (tm != null) {
        status = tm.getTransaction(txAttr);
      }
View Full Code Here

  /**
   * Register jobs and triggers (within a transaction, if possible).
   */
  protected void registerJobsAndTriggers() throws SchedulerException {
    TransactionStatus transactionStatus = null;
    if (this.transactionManager != null) {
      transactionStatus = this.transactionManager.getTransaction(new DefaultTransactionDefinition());
    }
    try {

View Full Code Here

TOP

Related Classes of org.springframework.transaction.TransactionStatus

Copyright © 2018 www.massapicom. 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.