Package com.arjuna.ats.internal.jta.transaction.jts.subordinate.jca

Examples of com.arjuna.ats.internal.jta.transaction.jts.subordinate.jca.TransactionImple


 
  public void cancelWork (Work work, Xid xid)
  {
    try
    {
      TransactionImple tx = TxImporter.importTransaction(xid);

      TxWorkManager.removeWork(work, tx);
    }
    catch (Exception ex)
    {
View Full Code Here


   
    SubordinateTransaction imported = getImportedTransaction(xid);
   
    if (imported == null)
    { 
      imported = new TransactionImple(timeout, xid);
     
      _transactions.put(new XidImple(xid), imported);
    }
   
    return imported;
View Full Code Here

  public SubordinateTransaction recoverTransaction (Uid actId) throws XAException
  {
    if (actId == null)
      throw new IllegalArgumentException();
   
    TransactionImple recovered = new TransactionImple(actId);
    TransactionImple tx = (TransactionImple) _transactions.get(recovered.baseXid());

    if (tx == null)
    {
      recovered.recordTransaction();
View Full Code Here

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

          while (!values.empty())
          {
            TransactionImple id = (TransactionImple) values.pop();

            indoubt[index] = id.baseXid();

            index++;
          }
        }
      }
View Full Code Here

        }
    }
   
    @Override
    public SubordinateTransaction createTransaction() {
            return new TransactionImple(0); // implicit begin
    }
View Full Code Here

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

                    while (!values.empty())
                    {
                        TransactionImple id = (TransactionImple) values.pop();

                        indoubt[index] = id.baseXid();

                        index++;
                    }
                }
            }
View Full Code Here

   
    /*
     * Check to see if we haven't already imported this thing.
     */
   
    TransactionImple imported = getImportedTransaction(xid);
   
    if (imported == null)
    { 
      imported = new TransactionImple(timeout, xid);
     
      _transactions.put(new XidImple(xid), imported);
    }
   
    return imported;
View Full Code Here

  public static TransactionImple recoverTransaction (Uid actId) throws XAException
  {
    if (actId == null)
      throw new IllegalArgumentException();
   
    TransactionImple recovered = new TransactionImple(actId);
    TransactionImple tx = (TransactionImple) _transactions.get(recovered.baseXid());

    if (tx == null)
    {
      recovered.recordTransaction();
View Full Code Here

  public static TransactionImple getImportedTransaction (Xid xid) throws XAException
  {
    if (xid == null)
      throw new IllegalArgumentException();
   
    TransactionImple tx = (TransactionImple) _transactions.get(new XidImple(xid));
   
    if (tx == null)
      return null;

    if (tx.baseXid() == null)
    {
      /*
       * Try recovery again. If it fails we'll throw a RETRY to the caller who
       * should try again later.
       */
     
      tx.getControlWrapper().getImple().getImplHandle().activate();

      return tx;
    }
    else
      return tx;
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 (tx.baseXid() != null// activate failed?
      {
        if (onePhase)
          tx.doOnePhaseCommit();
        else
          tx.doCommit();
       
        TxImporter.removeImportedTransaction(xid);
      }
      else
        throw new XAException(XAException.XA_RETRY);
View Full Code Here

TOP

Related Classes of com.arjuna.ats.internal.jta.transaction.jts.subordinate.jca.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.