Examples of registerSynchronization()


Examples of bitronix.tm.BitronixTransaction.registerSynchronization()

        StatefulHolderThreadLocal threadLocal = statefulHolderTransactionMap.get(currentTxGtrid);
        if (threadLocal == null) {
            // This is the first time this TxGtrid/ThreadLocal is going into the map,
            // register interest in synchronization so we can remove it at commit/rollback
            try {
                transaction.registerSynchronization(new SharedStatefulHolderCleanupSynchronization(currentTxGtrid));
            } catch (Exception e) {
                // OK, forget it.  The transaction is either rollback only or already finished.
                return;
            }
View Full Code Here

Examples of com.arjuna.ats.internal.jta.transaction.arjunacore.jca.SubordinateTransaction.registerSynchronization()

    public void testOnePhaseCommitSync() throws Exception
    {
        final SubordinateTransaction tm = createTransaction();
        final TestSynchronization sync = new TestSynchronization();
        tm.registerSynchronization(sync);
        tm.doOnePhaseCommit();
        assertTrue(sync.isBeforeCompletionDone());
        assertTrue(sync.isAfterCompletionDone());
        assertEquals(javax.transaction.Status.STATUS_COMMITTED, tm.getStatus());
    }
View Full Code Here

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

    public void testOnePhaseCommitSync() throws Exception
    {
        final TransactionImple tm = new TransactionImple(0);
        final TestSynchronization sync = new TestSynchronization();
        tm.registerSynchronization(sync);
        tm.doOnePhaseCommit();
        assertTrue(sync.isBeforeCompletionDone());
        assertTrue(sync.isAfterCompletionDone());
        assertEquals(javax.transaction.Status.STATUS_COMMITTED, tm.getStatus());
    }
View Full Code Here

Examples of com.arjuna.ats.internal.jta.transaction.arjunacore.subordinate.jca.TransactionImple.registerSynchronization()

       * 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.registerSynchronization()

       * 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.atomikos.icatch.CompositeTransaction.registerSynchronization()

        //first notify the session handle - see case 27857
        sessionHandleState.notifyBeforeUse ( ct , hmsg );
        if (ct != null && ct.getProperty ( TransactionManagerImp.JTA_PROPERTY_NAME ) != null ) {
          ret = true;
          if ( Configuration.isDebugLoggingEnabled() ) Configuration.logDebug ( this + ": detected transaction " + ct );
          if ( ct.getState().equals(TxState.ACTIVE) ) ct.registerSynchronization(new JdbcRequeueSynchronization( this , ct ));
          else AtomikosSQLException.throwAtomikosSQLException("The transaction has timed out - try increasing the timeout if needed");
        }
      }
     
    } catch (InvalidSessionHandleStateException ex) {
View Full Code Here

Examples of com.caucho.transaction.TransactionImpl.registerSynchronization()

      = (XAContextContainer) xa.getResource("caucho.xa.scope");
   
    if (context == null) {
      context = new XAContextContainer();
      xa.setAttribute("caucho.xa.scope", context);
      xa.registerSynchronization(context);
    }
   
    return context;
  }
View Full Code Here

Examples of com.caucho.transaction.TransactionImpl.registerSynchronization()

    ScopeContext cxt = (ScopeContext) xa.getResource("caucho.xa.scope");
   
    if (cxt == null) {
      cxt = new ScopeContext();
      xa.putResource("caucho.xa.scope", cxt);
      xa.registerSynchronization(cxt);
    }
   
    T result = cxt.get(bean);

    if (result != null || creationalContext == null)
View Full Code Here

Examples of com.caucho.transaction.TransactionImpl.registerSynchronization()

        xa.setAttribute("resin.env.jpa.EntityManagerItem", item);
       
        // _threadEntityManager.set(item);

        xa.registerSynchronization(item);

        return em;
      }

      /*
 
View Full Code Here

Examples of com.sun.enterprise.transaction.api.JavaEETransaction.registerSynchronization()

        JavaEETransaction tx = (JavaEETransaction) jtx;
        TxData txData = getTxData(tx);

        if( txData.sync == null ) {
            txData.sync = new ContainerSynchronization(tx, this);
            tx.registerSynchronization(txData.sync);
        }

        return txData.sync;
    }
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.