Package org.jboss.messaging.core.impl.tx

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


         {
            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

            log.warn("No " + (dlq ? "DLQ" : "expiry queue") + " has been specified so the message will be removed");

            del.acknowledge(tx);
         }

         tx.commit();
      }
      catch (Throwable t)
      {
         tx.rollback();
         throw t;
View Full Code Here

      assertEquals(2, msgs.size());
      assertTrue(msgs.contains(new Long(ref1.getMessage().getMessageID())));
      assertTrue(msgs.contains(new Long(ref2.getMessage().getMessageID())));

      //commit transaction
      tx.commit();

      assertEquals("numberOfRegisteredTransactions",0,txRep.getNumberOfRegisteredTransactions());

      //check we can see only the last 3 refs
      refs = getReferenceIds(channel.getChannelID());
View Full Code Here

            log.warn("No " + (dlq ? "DLQ" : "expiry queue") + " has been specified so 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

      assertEquals(0, queue.browse(null).size());

      // no message at the receiver
      assertTrue(r.getMessages().isEmpty());

      tx.commit();

      assertTrue(queue.browse(null).isEmpty());

      List received = r.getMessages();
      assertEquals(1, received.size());
View Full Code Here

      queue.handle(observer, ref, tx);

      // no messages in the channel
      assertEquals(0, queue.browse(null).size());

      tx.commit();

      assertEquals(2, queue.browse(null).size());
      assertEquals(1, brokenReceiver.getMessages().size());
   }
View Full Code Here

      assertEquals(0, queue.browse(null).size());

      // no message at the receiver
      assertTrue(r.getMessages().isEmpty());

      tx.commit();

      assertTrue(queue.browse(null).isEmpty());
      assertEqualSets(refs, r.getMessages());
   }
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.