Package org.jboss.messaging.core.tx

Examples of org.jboss.messaging.core.tx.Transaction.commit()


               "The message will be removed");
           
            del.acknowledge(tx);
         }            
        
         tx.commit();        
      }
      catch (Throwable t)
      {
         tx.rollback();
         throw t;
View Full Code Here


         {
            if (trace) { log.trace(this + " received ONE_PHASE_COMMIT request"); }
           
            Transaction tx = tr.createTransaction();
            processTransaction(request.getState(), tx, checkForDuplicates);
            tx.commit();
         }       
         else if (request.getRequestType() == TransactionRequest.TWO_PHASE_PREPARE_REQUEST)
         {                       
            if (trace) { log.trace(this + " received TWO_PHASE_COMMIT prepare request"); }
           
View Full Code Here

         {  
            if (trace) { log.trace(this + " received TWO_PHASE_COMMIT commit request"); }
            
            Transaction tx = tr.getPreparedTx(request.getXid());           
            if (trace) { log.trace("Committing " + tx); }
            tx.commit();  
         }
         else if (request.getRequestType() == TransactionRequest.TWO_PHASE_ROLLBACK_REQUEST)
         {
            if (trace) { log.trace(this + " received TWO_PHASE_COMMIT rollback request"); }
            
View Full Code Here

         queue.handle(null, refs[i], tx);
        
         refs[i].releaseMemoryReference();
      }
      tx.prepare();
      tx.commit();
     
      //verify no refs in storage
           
      List refIds = getReferenceIdsOrderedByPageOrd(queue.getChannelID());
      assertTrue(refIds.isEmpty());
View Full Code Here

      refs[99] = ms.reference(msgs[99]);
      queue.handle(null, refs[99], tx);
      refs[99].releaseMemoryReference();
     
      tx.prepare();
      tx.commit();
     
      //verify no refs in storage
     
      refIds = getReferenceIdsOrderedByPageOrd(queue.getChannelID());
      assertTrue(refIds.isEmpty());
View Full Code Here

         refs[i] = ms.reference(msgs[i]);
         queue.handle(null, refs[i], tx);        
         refs[i].releaseMemoryReference();
      }
      tx.prepare();
      tx.commit();
     
      //verify no refs in storage
     
      refIds = getReferenceIdsOrderedByPageOrd(queue.getChannelID());
      assertTrue(refIds.isEmpty());
View Full Code Here

      msgs[109] = CoreMessageFactory.createCoreMessage(109, false, null);
      refs[109] = ms.reference(msgs[109]);
      queue.handle(null, refs[109], tx);
      refs[109].releaseMemoryReference();
      tx.prepare();
      tx.commit();
     
      //verify 10 refs in storage
     
      refIds = getReferenceIdsOrderedByPageOrd(queue.getChannelID());
      assertEquals(10, refIds.size());
View Full Code Here

      msgs[110] = CoreMessageFactory.createCoreMessage(110, false, null);
      refs[110] = ms.reference(msgs[110]);
      queue.handle(null, refs[110], tx);
      refs[110].releaseMemoryReference();
      tx.prepare();
      tx.commit();
     
      //verify 10 refs in storage
     
      refIds = getReferenceIdsOrderedByPageOrd(queue.getChannelID());
      assertEquals(10, refIds.size());
View Full Code Here

         refs[i] = ms.reference(msgs[i]);
         queue.handle(null, refs[i], tx);        
         refs[i].releaseMemoryReference();
      }     
      tx.prepare();
      tx.commit();
     
      //verify 20 refs in storage
     
      refIds = getReferenceIdsOrderedByPageOrd(queue.getChannelID());
      assertEquals(20, refIds.size());
View Full Code Here

         refs[i] = ms.reference(msgs[i]);
         queue.handle(null, refs[i], tx)
         refs[i].releaseMemoryReference();
     
      tx.prepare();
      tx.commit();
     
      //verify 30 refs in storage
     
      refIds = getReferenceIdsOrderedByPageOrd(queue.getChannelID());
      assertEquals(30, refIds.size());
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.