Package org.jboss.jms.exception

Examples of org.jboss.jms.exception.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);
      }

      if (state.isRollbackOnly())
      {
         this.rollback(xid, state, connection);
         throw new MessagingXAException(XAException.XA_RBROLLBACK, "Transaction marked rollback only, xid: " + xid);
      }
     
      TransactionRequest request =
         new TransactionRequest(TransactionRequest.TWO_PHASE_PREPARE_REQUEST, xid, state);
     
View Full Code Here

     
      //roll back for onePhase only. for 2pc, rollback only is processed in prepare
      if ((tx != null) && tx.isRollbackOnly() && onePhase)
      {
         this.rollback(xid, tx, connection);
         throw new MessagingXAException(XAException.XA_RBROLLBACK, "Transaction marked rollback only, xid: " + xid);
      }
         
      if (onePhase)
      {
         //Invalid xid
         if (tx == null)
         {      
            throw new MessagingXAException(XAException.XAER_NOTA, "Cannot find transaction with xid:" + 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

     
      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

      ClientTransaction newTx = getTxInternal(xid);

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

      //Remove the local tx

      ClientTransaction local = removeTxInternal(localTx);

      if (local == null)
      {
         throw new MessagingXAException(XAException.XAER_NOTA, "Cannot find transaction with xid:" + localTx);
      }

      newTx.mergeIn(local);
      return xid;
   }
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.exception.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.