Examples of TransactionImple


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

            finished = true;
          }

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

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

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

          indoubt = new Xid[values.size()];
               
          while (!values.empty())
          {
            TransactionImple id = (TransactionImple) values.pop();

            indoubt[index] = id.baseXid();

            index++;
          }
        }
      }
View Full Code Here

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

  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

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

  public void registerWork (Work work, Xid xid, long timeout)
      throws WorkCompletedException
  {
    try
    {
      TransactionImple tx = TxImporter.importTransaction(xid, (int) timeout);

      switch (tx.getStatus())
      {
      case Status.STATUS_NO_TRANSACTION:
      case Status.STATUS_UNKNOWN:
        throw new WorkCompletedException(
            jbossatxLogger.logMesg.getString("com.arjuna.ats.jbossatx.jts.jca.inactive"),
            WorkException.TX_RECREATE_FAILED);
      case Status.STATUS_ACTIVE:
        break;
      default:
        throw new WorkCompletedException(
            jbossatxLogger.logMesg.getString("com.arjuna.ats.jbossatx.jts.jca.completing"),
            WorkException.TX_CONCURRENT_WORK_DISALLOWED);
      }

      TxWorkManager.addWork(work, tx);

      /*
       * TODO currently means one synchronization per work item and that
       * instance isn't removed when/if the work item is cancelled and
       * another work item is later added.
       *
       * Synchronizations are pretty lightweight and this add/remove/add
       * scenario will hopefully not happen that much. So, we don't
       * optimise for it at the moment. Re-evaluate if it does become an
       * overhead.
       */

      tx.registerSynchronization(new WorkSynchronization(tx));
    }
    catch (WorkCompletedException ex)
    {
      throw ex;
    }
View Full Code Here

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

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

      // JBoss doesn't seem to use the work parameter!

      if (!TxWorkManager.getWork(tx).equals(work))
      {
View Full Code Here

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

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

      TransactionManager.transactionManager().suspend();

      TxWorkManager.removeWork(work, tx);
    }
View Full Code Here

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

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

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

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

  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

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

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

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

            indoubt[index] = id.baseXid();

            index++;
          }
        }
      }
View Full Code Here

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

        }
    }
   
    @Override
    public SubordinateTransaction createTransaction() {
            return new TransactionImple(0); // implicit begin
    }
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.