Package org.jboss.jms.util

Examples of org.jboss.jms.util.MessagingXAException


     
      ClientTransaction state = getTxInternal(xid);
     
      if (state != null)
      {
         throw new MessagingXAException(XAException.XAER_DUPID, "Transaction already exists with xid " + xid);
      }
           
      transactions.put(xid, new ClientTransaction());
     
      return xid;
View Full Code Here


       
      ClientTransaction state = getTxInternal(xid);
     
      if (state == null)
      { 
         throw new MessagingXAException(XAException.XAER_NOTA, "Cannot find transaction with xid:" + xid);
      }       
     
      state.setState(ClientTransaction.TX_ENDED);
   }
View Full Code Here

     
      ClientTransaction state = getTxInternal(xid);
     
      if (state == null)
      {
         throw new MessagingXAException(XAException.XAER_NOTA, "Cannot find transaction with xid:" + xid);
      }
     
      checkAndRollbackXA(state, xid);
     
      TransactionRequest request =
View Full Code Here

      if (onePhase)
      {
         //Invalid xid
         if (tx == null)
         {      
            throw new MessagingXAException(XAException.XAER_NOTA, "Cannot find transaction with xid:" + xid);
         }
        
         checkAndRollbackXA(tx, xid);
        
         TransactionRequest request =
            new TransactionRequest(TransactionRequest.ONE_PHASE_COMMIT_REQUEST, null, tx);
        
         request.state = tx;   
        
         sendTransactionXA(request, connection);
      }
      else
      {
         if (tx != null)
         {
            if (tx.getState() != ClientTransaction.TX_PREPARED)
            {   
               throw new MessagingXAException(XAException.XAER_PROTO, "commit called for transaction, but it is not prepared");
            }
         }
         else
         {
            //It's possible we don't actually have the prepared tx here locally - this
View Full Code Here

      {
         //For one phase rollback there is nothing to do on the server
        
         if (tx == null)
         {    
            throw new MessagingXAException(XAException.XAER_NOTA, "Cannot find transaction with xid:" + xid);
         }
      }
                 
      //we redeliver the messages
      //locally to their original consumers if they are still open or cancel them to the server
View Full Code Here

     
      ClientTransaction state = getTxInternal(xid);
     
      if (state == null)
      {        
         throw new MessagingXAException(XAException.XAER_NOTA, "Cannot find transaction with xid:" + xid);
      }
     
      return xid;
   }
View Full Code Here

     
      ClientTransaction state = getTxInternal(xid);
     
      if (state == null)
      {      
         throw new MessagingXAException(XAException.XAER_NOTA, "Cannot find transaction with xid:" + xid);
      }
     
      return xid;
   }
View Full Code Here

      ClientTransaction state = getTxInternal(xid);
     
      if (state == null)
      {      
         throw new MessagingXAException(XAException.XAER_NOTA, "Cannot find transaction with xid:" + xid);
      }
     
      return xid;
   }
View Full Code Here

     
      ClientTransaction newTx = getTxInternal(xid);

      if (newTx != null)
      {       
         throw new MessagingXAException(XAException.XAER_DUPID, "Transaction already exists:" + xid);
      }

      //Remove the local tx
     
      ClientTransaction local = removeTxInternal(localTx);

      if (local == null)
      {       
         throw new MessagingXAException(XAException.XAER_NOTA, "Cannot find transaction with xid:" + localTx);
      }
     
      // Add the local back in with the new xid
     
      transactions.put(xid, local);
View Full Code Here

            return txs;
         }
         catch (JMSException e)
         {
            throw new MessagingXAException(XAException.XAER_RMFAIL, "Failed to get prepared transactions");
         }
      }
      else
      {
         return new Xid[0];
View Full Code Here

TOP

Related Classes of org.jboss.jms.util.MessagingXAException

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.