Package org.jboss.jms.tx

Examples of org.jboss.jms.tx.TransactionRequest


   public void read(DataInputStream is) throws Exception
   {
      super.read(is);
     
      req = new TransactionRequest();
     
      req.read(is);

      checkForDuplicates = is.readBoolean();
   }
View Full Code Here


     
      public void testConnectionSendTransactionRequest() throws Exception
      {
         ClientTransaction tx = new ClientTransaction();
        
         TransactionRequest tr = new TransactionRequest(TransactionRequest.ONE_PHASE_COMMIT_REQUEST, null, tx);
        
         RequestSupport req =
            new ConnectionSendTransactionRequest(23, (byte)77, tr, false);
                
         testPacket(req, PacketSupport.REQ_CONNECTION_SENDTRANSACTION);                          
View Full Code Here

        
         crash(target);
      }
      else if (target instanceof ConnectionAdvised && "sendTransaction".equals(methodName))
      {
         TransactionRequest request = (TransactionRequest)mi.getArguments()[0];
        
         if (request.getRequestType() == TransactionRequest.TWO_PHASE_COMMIT_REQUEST
             && type == TYPE_2PC_COMMIT)
         {
            //Crash before 2pc commit (after prepare)- used in message bridge tests
           
            log.info("##### Crashing on 2PC commit!!");
           
            crash(target);
         }
         else if (request.getRequestType() == TransactionRequest.ONE_PHASE_COMMIT_REQUEST &&
             type == FAIL_AFTER_SENDTRANSACTION)
         {
            invocation.invokeNext();
            log.info("#### Crash after sendTransaction");
            crash(target);
View Full Code Here

        
         crash(target);
      }
      else if (target instanceof ConnectionAdvised && "sendTransaction".equals(methodName))
      {
         TransactionRequest request = (TransactionRequest)mi.getArguments()[0];
        
         if (request.getRequestType() == TransactionRequest.TWO_PHASE_COMMIT_REQUEST
             && type == TYPE_2PC_COMMIT)
         {
            //Crash before 2pc commit (after prepare)- used in message bridge tests
           
            log.info("##### Crashing on 2PC commit!!");
           
            crash(target);
         }
         else if (request.getRequestType() == TransactionRequest.ONE_PHASE_COMMIT_REQUEST &&
             type == FAIL_AFTER_SENDTRANSACTION)
         {
            invocation.invokeNext();
            log.info("#### Crash after sendTransaction");
            crash(target);
View Full Code Here

   public void read(DataInputStream is) throws Exception
   {
      super.read(is);
     
      req = new TransactionRequest();
     
      req.read(is);

      checkForDuplicates = is.readBoolean();
   }
View Full Code Here

      ConnectionAdvised del = (ConnectionAdvised)invocation.getTargetObject();
      ServerConnectionEndpoint ce = (ServerConnectionEndpoint)del.getEndpoint();

      MethodInvocation mi = (MethodInvocation)invocation;

      TransactionRequest t = (TransactionRequest)mi.getArguments()[0];

      ClientTransaction txState = t.getState();

      if (txState != null)
      {
         // distinct list of destinations...
         HashSet destinations = new HashSet();
View Full Code Here

         crash(target);
      }
      else if (target instanceof ConnectionAdvised && "sendTransaction".equals(methodName))
      {
         TransactionRequest request = (TransactionRequest)mi.getArguments()[0];

         if (request.getRequestType() == TransactionRequest.TWO_PHASE_COMMIT_REQUEST
             && type == TYPE_2PC_COMMIT)
         {
            //Crash before 2pc commit (after prepare)- used in message bridge tests

            log.info("##### Crashing on 2PC commit!!");

            crash(target);
         }
         else if (request.getRequestType() == TransactionRequest.ONE_PHASE_COMMIT_REQUEST &&
             type == FAIL_AFTER_SENDTRANSACTION)
         {
            invocation.invokeNext();
            log.info("#### Crash after sendTransaction");
            crash(target);
         }
         else if (request.getRequestType() == TransactionRequest.ONE_PHASE_COMMIT_REQUEST &&
               type == FAIL_BEFORE_SENDTRANSACTION)
        {
           log.info("#### Crash before sendTransaction");
           crash(target);
        }
View Full Code Here

     
      public void testConnectionSendTransactionRequest() throws Exception
      {
         ClientTransaction tx = new ClientTransaction();
        
         TransactionRequest tr = new TransactionRequest(TransactionRequest.ONE_PHASE_COMMIT_REQUEST, null, tx);
        
         RequestSupport req =
            new ConnectionSendTransactionRequest("23", (byte)77, tr, false);
                
         testPacket(req, PacketSupport.REQ_CONNECTION_SENDTRANSACTION);                          
View Full Code Here

      ConnectionAdvised del = (ConnectionAdvised)invocation.getTargetObject();
      ServerConnectionEndpoint ce = (ServerConnectionEndpoint)del.getEndpoint();

      MethodInvocation mi = (MethodInvocation)invocation;

      TransactionRequest t = (TransactionRequest)mi.getArguments()[0];

      ClientTransaction txState = t.getState();

      if (txState != null)
      {
         // distinct list of destinations...
         HashSet destinations = new HashSet();
View Full Code Here

         crash(target);
      }
      else if (target instanceof ConnectionAdvised && "sendTransaction".equals(methodName))
      {
         TransactionRequest request = (TransactionRequest)mi.getArguments()[0];

         if (request.getRequestType() == TransactionRequest.TWO_PHASE_COMMIT_REQUEST
             && type == TYPE_2PC_COMMIT)
         {
            //Crash before 2pc commit (after prepare)- used in message bridge tests

            log.info("##### Crashing on 2PC commit!!");

            crash(target);
         }
         else if (request.getRequestType() == TransactionRequest.ONE_PHASE_COMMIT_REQUEST &&
             type == FAIL_AFTER_SENDTRANSACTION)
         {
            invocation.invokeNext();
            log.info("#### Crash after sendTransaction");
            crash(target);
         }
         else if (request.getRequestType() == TransactionRequest.ONE_PHASE_COMMIT_REQUEST &&
               type == FAIL_BEFORE_SENDTRANSACTION)
        {
           log.info("#### Crash before sendTransaction");
           crash(target);
        }
View Full Code Here

TOP

Related Classes of org.jboss.jms.tx.TransactionRequest

Copyright © 2018 www.massapicom. 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.