Package org.teiid.client.xa

Examples of org.teiid.client.xa.XATransactionException


      transactionManager.begin();
      Transaction tx = transactionManager.suspend();
      tc.setTransaction(tx);
      tc.setCreationTime(System.currentTimeMillis());
        } catch (javax.transaction.NotSupportedException err) {
            throw new XATransactionException(err);
        } catch (SystemException err) {
            throw new XATransactionException(err);
        }
  }
View Full Code Here


  private void commitDirect(TransactionContext context)
      throws XATransactionException {
    try {
      transactionManager.commit();
    } catch (SecurityException e) {
      throw new XATransactionException(e);
    } catch (RollbackException e) {
      throw new XATransactionException(e);
    } catch (HeuristicMixedException e) {
      throw new XATransactionException(e);
    } catch (HeuristicRollbackException e) {
      throw new XATransactionException(e);
    } catch (SystemException e) {
      throw new XATransactionException(e);
    } finally {
      transactions.removeTransactionContext(context);
    }
  }
View Full Code Here

  private void rollbackDirect(TransactionContext tc)
      throws XATransactionException {
    try {
        this.transactionManager.rollback();
    } catch (SecurityException e) {
      throw new XATransactionException(e);
    } catch (SystemException e) {
      throw new XATransactionException(e);
    } finally {
            transactions.removeTransactionContext(tc);
        }
  }
View Full Code Here

 
  public void suspend(TransactionContext context) throws XATransactionException {
    try {
      this.transactionManager.suspend();
    } catch (SystemException e) {
      throw new XATransactionException(e);
    }
  }
View Full Code Here

 
  public void resume(TransactionContext context) throws XATransactionException {
    try {
      this.transactionManager.resume(context.getTransaction());
    } catch (InvalidTransactionException e) {
      throw new XATransactionException(e);
    } catch (SystemException e) {
      throw new XATransactionException(e);
    }
  }
View Full Code Here

    /**
     * Request level transaction
     */
    public TransactionContext begin(TransactionContext context) throws XATransactionException{
        if (context.getTransactionType() != TransactionContext.Scope.NONE) {
            throw new XATransactionException(QueryPlugin.Util.getString("TransactionServer.existing_transaction")); //$NON-NLS-1$
        }
        beginDirect(context);
        context.setTransactionType(TransactionContext.Scope.REQUEST);
        return context;
    }
View Full Code Here

        }
       
        try {
            tc.getTransaction().setRollbackOnly();
    } catch (SystemException e) {
      throw new XATransactionException(e);
    }
    }
View Full Code Here

TOP

Related Classes of org.teiid.client.xa.XATransactionException

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.