Package org.jboss.messaging.core.tx

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


        
         tx.commit();        
      }
      catch (Throwable t)
      {
         tx.rollback();
         throw t;
      }
      finally
      {
         if (ref != null)
View Full Code Here


            
            Transaction tx =  tr.getPreparedTx(request.getXid());

            if (trace) { log.trace(this + " rolling back " + tx); }

            tx.rollback();
         }     
                
         if (trace) { log.trace(this + " processed transaction successfully"); }
      }
      catch (Throwable t)
View Full Code Here

         MessageReference ref = ms.reference(m);
         queue.handle(null, ref, tx);       
         ref.releaseMemoryReference();
     
      tx.prepare();
      tx.rollback();
     
     
      //Send 10 more refs
     
      tx = createXATx();
View Full Code Here

         Message m = CoreMessageFactory.createCoreMessage(i, true, null);
         MessageReference ref = ms.reference(m);
         queue.handle(null, ref, tx);    
         ref.releaseMemoryReference();
     
      tx.rollback();
  
     
      //Send 10 more refs
     
      tx = tr.createTransaction();
View Full Code Here

         Message m = CoreMessageFactory.createCoreMessage(i, true, null);
         MessageReference ref = ms.reference(m);
         queue.handle(null, ref, tx);        
         ref.releaseMemoryReference();
     
      tx.rollback();
     
     
      //Send 10 more refs
      tx = tr.createTransaction();
      for (int i = 130; i < 140; i++)
View Full Code Here

         MessageReference ref = ms.reference(m);
         queue.handle(null, ref, tx);      
         ref.releaseMemoryReference();
     
      tx.prepare();
      tx.rollback();
     
     
      //Send 10 more refs
      tx = createXATx();
      for (int i = 120; i < 130; i++)
View Full Code Here

      assertEquals(2, msgs.size());
      assertTrue(msgs.contains(new Long(ref1.getMessage().getMessageID())));
      assertTrue(msgs.contains(new Long(ref2.getMessage().getMessageID())));
     
      //rollback transaction
      tx.rollback();
     
      refs = getReferenceIds(channel.getChannelID());
      assertNotNull(refs);
      assertEquals(2, refs.size());
      assertTrue(refs.contains(new Long(ref1.getMessage().getMessageID())));
View Full Code Here

        
         msgs = queue2.browse();
         assertNotNull(msgs);
         assertTrue(msgs.isEmpty());
        
         tx.rollback();
        
         msgs = receiver1.getMessages();
         assertNotNull(msgs);
         assertTrue(msgs.isEmpty());
        
View Full Code Here

         assertEquals(2, deliveringCount);
        
         deliveringCount = queue2.getDeliveringCount();
         assertEquals(2, deliveringCount);
        
         tx.rollback();
        
         deliveringCount = queue1.getDeliveringCount();
         assertEquals(2, deliveringCount);                 
        
         receiver1.acknowledge(msgRec1, null);
View Full Code Here

            msgs = queues[i].browse();
            assertNotNull(msgs);
            assertTrue(msgs.isEmpty());
         }
        
         tx.rollback();
        
         for (int i = 0; i < 16; i++)
         {
            List msgs = receivers[i].getMessages();
            assertNotNull(msgs);
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.