Package javax.transaction

Examples of javax.transaction.TransactionManager.suspend()


      //let's put some values
      atomicMap.put("k1", "v1");

      tm.begin();
      AssertJUnit.assertEquals("v1", atomicMap.get("k1"));
      final Transaction tx1 = tm.suspend();

      tm.begin();
      AssertJUnit.assertEquals("v1", atomicMap.get("k1"));
      final Transaction tx2 = tm.suspend();
View Full Code Here


      AssertJUnit.assertEquals("v1", atomicMap.get("k1"));
      final Transaction tx1 = tm.suspend();

      tm.begin();
      AssertJUnit.assertEquals("v1", atomicMap.get("k1"));
      final Transaction tx2 = tm.suspend();

      tm.resume(tx1);
      atomicMap.put("k1", "v2");
      tm.commit();
View Full Code Here

      boolean caughtException = false;

      try {
        // First we need to suspend any current JTA transaction and obtain
        // a JDBC connection
        surroundingTransaction = transactionManager.suspend();
        if ( log.isDebugEnabled() ) {
          log.debug( "surrounding JTA transaction suspended [" + surroundingTransaction + "]" );
        }

        if ( transacted ) {
View Full Code Here

      if (trace)
         log.trace("MessageEndpoint " + getProxyString(proxy) + " " + context + " method=" + method + " xaResource=" + resource + " transacted=" + isTransacted);

      // Get the transaction status
      TransactionManager tm = TxUtil.getTransactionManager(); //container.getTransactionManager();
      suspended = tm.suspend();

      if (trace)
         log.trace("MessageEndpoint " + getProxyString(proxy) + " " + context + " currentTx=" + suspended);

      // Delivery is transacted
View Full Code Here

           
            // Suspend any bad transaction - there is bug somewhere, but we will try to tidy things up
            if (currentTx != null && currentTx.equals(transaction) == false)
            {
               log.warn("Current transaction " + currentTx + " is not the expected transaction.");
               tm.suspend();
               tm.resume(transaction);
            }
            else
            {
               // We have the correct transaction
View Full Code Here

      boolean caughtException = false;

      try {
        // First we need to suspend any current JTA transaction and obtain
        // a JDBC connection
        surroundingTransaction = transactionManager.suspend();
        if ( log.isDebugEnabled() ) {
          log.debug( "surrounding JTA transaction suspended [" + surroundingTransaction + "]" );
        }

        if ( transacted ) {
View Full Code Here

      boolean ok;
     
      Transaction toResume = null;
      try
      {
         toResume = tm.suspend();
        
         ok = setupJMSObjects();
      }
      finally
      {
View Full Code Here

      Transaction tx = tm.getTransaction();
     
      //Remove the association between current thread - we don't want it
      //we will be committing /rolling back directly on the transaction object
     
      tm.suspend();
     
      if (trace) { log.trace("Started JTA transaction"); }
     
      return tx;
   }
View Full Code Here

      boolean ok;

      Transaction toResume = null;
      try
      {
         toResume = tm.suspend();

         ok = setupJMSObjects();
      }
      finally
      {
View Full Code Here

      Transaction tx = tm.getTransaction();

      // Remove the association between current thread - we don't want it
      // we will be committing /rolling back directly on the transaction object

      tm.suspend();

      if (JMSBridgeImpl.trace)
      {
         JMSBridgeImpl.log.trace("Started JTA transaction");
      }
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.