Package org.jboss.jms.util

Examples of org.jboss.jms.util.MessagingXAException


        
         //Therefore we throw XA_RETRY
         //Note we DO NOT throw XAER_RMFAIL or XAER_RMERR since both if these will cause the Arjuna
         //tx mgr NOT to retry and the transaction will have to be resolve manually.
        
         throw new MessagingXAException(XAException.XA_RETRY, "A Throwable was caught in sending the transaction", t);
      }
   }
View Full Code Here


        
         final String msg = "Rolled back tx branch to avoid possibility of duplicates http://jira.jboss.org/jira/browse/JBMESSAGING-883";
        
         if (xa)
         {
            return new MessagingXAException(XAException.XA_HEURRB, msg);
         }
         else
         {
            return new MessagingTransactionRolledBackException(msg);
         }           
View Full Code Here

      Object currentXid = sessionState.getCurrentTxId();
     
      // Sanity check
      if (currentXid == null)
      {
         throw new MessagingXAException(XAException.XAER_RMFAIL, "Current xid is not set");
      }
     
      if (flags == TMNOFLAGS && sessionState.getCurrentTxId() instanceof LocalTx)
      {
         convertTx = true;
        
         if (trace) { log.trace("Converting local tx into global tx branch"); }
      }     

      //TODO why do we need this synchronized block?
      synchronized (this)
      {
         switch (flags)
         {
            case TMNOFLAGS :
               if (convertTx)
               {   
                  // If I commit/rollback the tx, then there is a short period of time between the
                  // AS (or whoever) calling commit on the tx and calling start to enrolling the
                  // session in a new tx. If the session has any listeners then in that period,
                  // messages can be received asychronously but we want them to be received in the
                  // context of a tx, so we convert.
                  // Also for an transacted delivery in a MDB we need to do this as discussed
                  // in fallbackToLocalTx()
                  setCurrentTransactionId(rm.convertTx((LocalTx)sessionState.getCurrentTxId(), xid));
               }
               else
               {                 
                  setCurrentTransactionId(rm.startTx(xid));                
               }
               break;
            case TMJOIN :
               setCurrentTransactionId(rm.joinTx(xid));
               break;
            case TMRESUME :
               setCurrentTransactionId(rm.resumeTx(xid));
               break;
            default:
               throw new MessagingXAException(XAException.XAER_PROTO, "Invalid flags: " + flags);
         }
      }
   }
View Full Code Here

               break;
            case TMSUCCESS :
               rm.endTx(xid, true);
               break;
            default :
               throw new MessagingXAException(XAException.XAER_PROTO, "Invalid flags: " + flags);        
         }     
      }
   }
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.