Package org.hornetq.core.transaction

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


               }
            });
         }
      });

      tx.commit();

   }

   private PagedReference getReference(PagePosition pos) throws Exception
   {
View Full Code Here


   public void ack(final PagedReference reference) throws Exception
   {
      // Need to do the ACK and counter atomically (inside a TX) or the counter could get out of sync
      Transaction tx = new TransactionImpl(this.store);
      ackTx(tx, reference);
      tx.commit();
   }

   public void confirmPosition(final PagePosition position) throws Exception
   {
      // if we are dealing with a persistent cursor
View Full Code Here

         deliveringCount.incrementAndGet();
         acknowledge(tx, messageReference);
         count++;
      }

      tx.commit();

      return count;
   }

   public synchronized boolean deleteReference(final long messageID) throws Exception
View Full Code Here

            deleted = true;
            break;
         }
      }

      tx.commit();

      return deleted;
   }

   public synchronized boolean expireReference(final long messageID) throws Exception
View Full Code Here

            refRemoved(ref);
            count++;
         }
      }

      tx.commit();

      return count;
   }

   public synchronized void expireReferences() throws Exception
View Full Code Here

            count++;
            move(toAddress, tx, ref, false, rejectDuplicates);
            acknowledge(tx, ref);
         }
  
         tx.commit();
  
         return count;
      }
      catch (Exception e)
      {
View Full Code Here

      postOffice.route(copyMessage, tx, false);

      acknowledge(tx, ref);

      tx.commit();
   }

   /*
    * This method delivers the reference on the callers thread - this can give us better latency in the case there is nothing in the queue
    */
 
View Full Code Here

               throw new HornetQXAException(XAException.XAER_PROTO, "Cannot commit transaction, it is suspended " + xid);
            }
            else
            {
               theTx.commit(onePhase);
            }
         }
      }
   }
View Full Code Here

               throw new HornetQXAException(XAException.XAER_PROTO, "Cannot commit transaction, it is suspended " + xid);
            }
            else
            {
               theTx.commit(onePhase);
            }
         }
      }
   }
View Full Code Here

            }
         }

         if (txCount > 0)
         {
            tx.commit();

            tx = new TransactionImpl(storageManager);

            txCount = 0;
         }
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.