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

Examples of com.arjuna.ats.internal.jta.transaction.arjunacore.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


      throws XAException
  {
    if (actId == null)
      throw new IllegalArgumentException();

    TransactionImple recovered = new TransactionImple(actId);

    /*
     * Is the transaction already in the list? This may be the case because
     * we scan the object store periodically and may get Uids to recover for
     * transactions that are progressing normally, i.e., do not need
     * recovery. In which case, we need to ignore them.
     */

    TransactionImple tx = (TransactionImple) _transactions.get(recovered
        .baseXid());

    if (tx == null)
    {
      _transactions.put(recovered.baseXid(), recovered);
View Full Code Here

public class SubordinateTestCase extends TestCase
{
    // This test class is subclassed by the JTAX version of the tests, so we isolate
    // the module specific tx creation code to this function, which then gets overridden.
    public SubordinateTransaction createTransaction() {
        return new TransactionImple(0); // implicit begin
    }
View Full Code Here

/*     */   {
/*  76 */     if (xid == null) {
/*  77 */       throw new IllegalArgumentException();
/*     */     }
/*     */
/*  83 */     TransactionImple imported = getImportedTransaction(xid);
/*     */
/*  85 */     if (imported == null)
/*     */     {
/*  87 */       imported = new TransactionImple(timeout, xid);
/*     */
/*  89 */       _transactions.put(new XidImple(xid), imported);
/*     */     }
/*     */
/*  92 */     return imported;
View Full Code Here

/*     */     throws XAException
/*     */   {
/* 105 */     if (actId == null) {
/* 106 */       throw new IllegalArgumentException();
/*     */     }
/* 108 */     TransactionImple recovered = new TransactionImple(actId);
/*     */
/* 117 */     TransactionImple tx = (TransactionImple)_transactions.get(recovered.baseXid());
/*     */
/* 119 */     if (tx == null)
/*     */     {
/* 121 */       _transactions.put(recovered.baseXid(), recovered);
/*     */
View Full Code Here

public class SubordinateTestCase extends TestCase
{
    // This test class is subclassed by the JTAX version of the tests, so we isolate
    // the module specific tx creation code to this function, which then gets overridden.
    public SubordinateTransaction createTransaction() {
        return new TransactionImple(0); // implicit begin
    }
View Full Code Here

/*     */   public void registerWork(Work work, Xid xid, long timeout)
/*     */     throws WorkCompletedException
/*     */   {
/*     */     try
/*     */     {
/* 108 */       TransactionImple tx = TxImporter.importTransaction(xid, (int)timeout);
/*     */
/* 110 */       switch (tx.getStatus())
/*     */       {
/*     */       case 5:
/*     */       case 6:
/* 114 */         throw new WorkCompletedException(jbossatxLogger.logMesg.getString("com.arjuna.ats.jbossatx.jta.jca.inactive"), "3");
/*     */       case 0:
/* 118 */         break;
/*     */       default:
/* 120 */         throw new WorkCompletedException(jbossatxLogger.logMesg.getString("com.arjuna.ats.jbossatx.jta.jca.completing"), "2");
/*     */       }
/*     */
/* 125 */       TxWorkManager.addWork(work, tx);
/*     */
/* 138 */       tx.registerSynchronization(new WorkSynchronization(tx));
/*     */     }
/*     */     catch (WorkCompletedException ex)
/*     */     {
/* 142 */       throw ex;
/*     */     }
View Full Code Here

/*     */   public void startWork(Work work, Xid xid)
/*     */     throws WorkCompletedException
/*     */   {
/*     */     try
/*     */     {
/* 174 */       TransactionImple tx = TxImporter.importTransaction(xid);
/*     */
/* 178 */       if (!TxWorkManager.getWork(tx).equals(work))
/*     */       {
/* 180 */         throw new WorkCompletedException(jbossatxLogger.logMesg.getString("com.arjuna.ats.jbossatx.jta.jca.unknownwork"), "-1");
/*     */       }
View Full Code Here

/*     */
/*     */   public void endWork(Work work, Xid xid)
/*     */   {
/*     */     try
/*     */     {
/* 217 */       TransactionImple tx = TxImporter.importTransaction(xid);
/*     */
/* 219 */       com.arjuna.ats.jta.TransactionManager.transactionManager().suspend();
/*     */
/* 221 */       TxWorkManager.removeWork(work, tx);
/*     */     }
View Full Code Here

/*     */
/*     */   public void cancelWork(Work work, Xid xid)
/*     */   {
/*     */     try
/*     */     {
/* 241 */       TransactionImple tx = TxImporter.importTransaction(xid);
/*     */
/* 243 */       TxWorkManager.removeWork(work, tx);
/*     */     }
/*     */     catch (Exception ex)
/*     */     {
View Full Code Here

TOP

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