Package com.arjuna.ats.internal.jta.transaction.arjunacore.subordinate

Examples of com.arjuna.ats.internal.jta.transaction.arjunacore.subordinate.TransactionImple


 
  public void commit (Xid xid, boolean onePhase) throws XAException
  {
    try
    {
      TransactionImple tx = TxImporter.getImportedTransaction(xid);
     
      if (tx == null)
        throw new XAException(XAException.XAER_INVAL);
     
      if (onePhase)
        tx.doOnePhaseCommit();
      else
        tx.doCommit();
     
      TxImporter.removeImportedTransaction(xid);
    }
    catch (XAException ex)
    {
View Full Code Here


 
  public void forget (Xid xid) throws XAException
  {
    try
    {
      TransactionImple tx = TxImporter.getImportedTransaction(xid);
     
      if (tx == null)
        throw new XAException(XAException.XAER_INVAL);
     
      tx.doForget();
    }
    catch (Exception ex)
    {
      throw new XAException(XAException.XAER_RMERR);
    }
View Full Code Here

 
  public int prepare (Xid xid) throws XAException
  {
    try
    {
      TransactionImple tx = TxImporter.getImportedTransaction(xid);
     
      if (tx == null)
        throw new XAException(XAException.XAER_INVAL);
     
      switch (tx.doPrepare())
      {
      case TwoPhaseOutcome.PREPARE_READONLY:
        TxImporter.removeImportedTransaction(xid);
       
        return XAResource.XA_RDONLY;       
View Full Code Here

            finished = true;
          }
         
          if (uid.notEquals(Uid.nullUid()))
          {
            TransactionImple tx = TxImporter.recoverTransaction(uid);
           
            if (tx != null)
              values.push(tx);
          }
          else
            finished = true;
         
        } while (!finished);
       
        if (values.size() > 0)
        {
          int index = 0;

          indoubt = new Xid[values.size()];
               
          while (!values.empty())
          {
            com.arjuna.ats.internal.jta.transaction.arjunacore.subordinate.jca.TransactionImple tx = (com.arjuna.ats.internal.jta.transaction.arjunacore.subordinate.jca.TransactionImple) values.pop();
           
            indoubt[index] = tx.baseXid();
            index++;
          }
        }
      }
    }
View Full Code Here

 
  public void rollback (Xid xid) throws XAException
  {
    try
    {
      TransactionImple tx = TxImporter.getImportedTransaction(xid);
     
      if (tx == null)
        throw new XAException(XAException.XAER_INVAL);
     
      tx.doRollback();
     
      TxImporter.removeImportedTransaction(xid);
    }
    catch (XAException ex)
    {
View Full Code Here

  public void commit (Xid xid, boolean onePhase) throws XAException
  {
    try
    {
      TransactionImple tx = TxImporter.getImportedTransaction(xid);

      if (tx == null)
        throw new XAException(XAException.XAER_INVAL);

      if (onePhase)
        tx.doOnePhaseCommit();
      else
        tx.doCommit();

      TxImporter.removeImportedTransaction(xid);
    }
        catch(RollbackException e) {
            TxImporter.removeImportedTransaction(xid);
View Full Code Here

  public void forget (Xid xid) throws XAException
  {
    try
    {
      TransactionImple tx = TxImporter.getImportedTransaction(xid);

      if (tx == null)
        throw new XAException(XAException.XAER_INVAL);

      tx.doForget();
    }
    catch (Exception ex)
    {
      throw new XAException(XAException.XAER_RMERR);
    }
View Full Code Here

  public int prepare (Xid xid) throws XAException
  {
    try
    {
      TransactionImple tx = TxImporter.getImportedTransaction(xid);

      if (tx == null)
        throw new XAException(XAException.XAER_INVAL);

      switch (tx.doPrepare())
      {
      case TwoPhaseOutcome.PREPARE_READONLY:
        TxImporter.removeImportedTransaction(xid);
        return XAResource.XA_RDONLY;
      case TwoPhaseOutcome.PREPARE_NOTOK:
                // the JCA API spec limits what we can do in terms of reporting problems.
                // try to use the exception code and cause to provide info whilst
                // ramining API compliant.  JBTM-427.
                Exception initCause = null;
                int xaExceptionCode = XAException.XA_RBROLLBACK;
                try {
                    tx.doRollback();
                } catch(HeuristicCommitException e) {
                    initCause = e;
                    xaExceptionCode = XAException.XAER_RMERR;
                } catch (HeuristicMixedException e) {
                    initCause = e;
View Full Code Here

            finished = true;
          }

          if (uid.notEquals(Uid.nullUid()))
          {
            TransactionImple tx = TxImporter.recoverTransaction(uid);

            if (tx != null)
              values.push(tx);
          }
          else
            finished = true;

        } while (!finished);

        if (values.size() > 0)
        {
          int index = 0;

          indoubt = new Xid[values.size()];

          while (!values.empty())
          {
            com.arjuna.ats.internal.jta.transaction.arjunacore.subordinate.jca.TransactionImple tx = (com.arjuna.ats.internal.jta.transaction.arjunacore.subordinate.jca.TransactionImple) values.pop();

            indoubt[index] = tx.baseXid();
            index++;
          }
        }
      }
    }
View Full Code Here

  public void rollback (Xid xid) throws XAException
  {
    try
    {
      TransactionImple tx = TxImporter.getImportedTransaction(xid);

      if (tx == null)
        throw new XAException(XAException.XAER_INVAL);

      tx.doRollback();

      TxImporter.removeImportedTransaction(xid);
    }
    catch (XAException ex)
    {
View Full Code Here

TOP

Related Classes of com.arjuna.ats.internal.jta.transaction.arjunacore.subordinate.TransactionImple

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.