Package org.hornetq.core.transaction

Examples of org.hornetq.core.transaction.Transaction.rollback()


         for (Xid xid : xids)
         {
            if (XidImpl.toBase64String(xid).equals(transactionAsBase64))
            {
               Transaction transaction = resourceManager.removeTransaction(xid);
               transaction.rollback();
               long recordID = server.getStorageManager().storeHeuristicCompletion(xid, false);
               server.getStorageManager().waitOnOperations();
               resourceManager.putHeuristicCompletion(recordID, xid, false);
               return true;
            }
View Full Code Here


         }
      }

      if (!running)
      {
         depageTransaction.rollback();
         return false;
      }

      for (PageTransactionInfo pageWithTransaction : pageTransactionsToUpdate)
      {
View Full Code Here

         for (Xid xid : xids)
         {
            if (XidImpl.toBase64String(xid).equals(transactionAsBase64))
            {
               Transaction transaction = resourceManager.removeTransaction(xid);
               transaction.rollback();
               long recordID = server.getStorageManager().storeHeuristicCompletion(xid, false);
               server.getStorageManager().waitOnOperations();
               resourceManager.putHeuristicCompletion(recordID, xid, false);
               return true;
            }
View Full Code Here

         MessageReference ref = iter.next();

         ref.getQueue().cancel(tx, ref);
      }

      tx.rollback();

      if (!browseOnly)
      {
         TypedProperties props = new TypedProperties();
View Full Code Here

         tx.commit();
      }
      catch (Exception e)
      {
         tx.rollback();
         throw e;
      }

   }
View Full Code Here

         // JBPAPP-8845 - if we let stuff to be acked on a rolled back TX, we will just
         // have these messages to be stuck on the limbo until the server is restarted
         // The tx has already timed out, so we need to ack and rollback immediately
         Transaction newTX = newTransaction();
         consumer.acknowledge(autoCommitAcks, newTX, messageID);
         newTX.rollback();
      }
      else
      {
         consumer.acknowledge(autoCommitAcks, tx, messageID);
      }
View Full Code Here

         // JBPAPP-8845 - if we let stuff to be acked on a rolled back TX, we will just
         // have these messages to be stuck on the limbo until the server is restarted
         // The tx has already timed out, so we need to ack and rollback immediately
         Transaction newTX = newTransaction();
         consumer.individualAcknowledge(autoCommitAcks, tx, messageID);
         newTX.rollback();
      }
      else
      {
         consumer.individualAcknowledge(autoCommitAcks, tx, messageID);
      }
View Full Code Here

         tx.commit();
      }
      catch (Exception e)
      {
         tx.rollback();
         throw e;
      }

   }
View Full Code Here

               }
               catch (Exception e)
               {
                  try
                  {
                     tx.rollback();
                  }
                  catch (Exception e2)
                  {
                     // Nothing much we can do now
View Full Code Here

         // JBPAPP-8845 - if we let stuff to be acked on a rolled back TX, we will just
         // have these messages to be stuck on the limbo until the server is restarted
         // The tx has already timed out, so we need to ack and rollback immediately
         Transaction newTX = newTransaction();
         consumer.acknowledge(autoCommitAcks, newTX, messageID);
         newTX.rollback();
      }
      else
      {
         consumer.acknowledge(autoCommitAcks, tx, messageID);
      }
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.