Package javax.transaction.xa

Examples of javax.transaction.xa.XAException.initCause()


                rollback();
            } catch (XAException e) {
                /* ignore */
            }
            XAException e = new XAException(XAException.XA_RBOTHER);
            e.initCause(txe);
            throw e;
        }

        // start rollback thread in case the commit is never issued
        new Thread(this, "RollbackThread").start();
View Full Code Here


    private XAException toXAException(JMSException e) {
        if (e.getCause() != null && e.getCause() instanceof XAException) {
            XAException original = (XAException)e.getCause();
            XAException xae = new XAException(original.getMessage());
            xae.errorCode = original.errorCode;
            xae.initCause(original);
            return xae;
        }

        XAException xae = new XAException(e.getMessage());
        xae.errorCode = XAException.XAER_RMFAIL;
View Full Code Here

            return xae;
        }

        XAException xae = new XAException(e.getMessage());
        xae.errorCode = XAException.XAER_RMFAIL;
        xae.initCause(e);
        return xae;
    }

    public ActiveMQConnection getConnection() {
        return connection;
View Full Code Here

          throw xaexception;
        } catch (Exception jmse) {
            System.err.println("MQRA:XARFMC:commit:XAException-Exception="+jmse.getMessage());
            Debug.printStackTrace(jmse);
            XAException xae = new XAException(XAException.XAER_RMFAIL);
            xae.initCause(jmse);
            throw xae;
        } finally {
            // finish up this resource and any others joined to it in this transaction
            boolean throwExceptionIfNotFound = false;
            XidImpl savedXid = this.jmqXid;
View Full Code Here

          xari.clearTransactionInfo();
        } catch (JMSException jmse) {
                System.err.println("MQRA:XARFMC:commit:XAException-Exception="+jmse.getMessage());
                Debug.printStackTrace(jmse);
                XAException xae = new XAException(XAException.XAER_RMFAIL);
                xae.initCause(jmse);
                throw xae;
        }
            }
            XAResourceMapForRAMC.unregister(savedXid);
        }
View Full Code Here

      //if any xaexception we simply propagate up
      throw xae2;
    } catch (Exception e) {
      //for any other exceptions, throws an XAException.
      XAException xae3 = new XAException(XAException.XAER_RMFAIL);
            xae3.initCause(e);
            throw xae3;
      }
   
    }
   
View Full Code Here

        throw (JMSException) ex;
      } else if (ex instanceof XAException) {
        throw (XAException) ex;
      } else {
        XAException xae = new XAException (XAException.XAER_RMFAIL);
        xae.initCause(ex);
        throw xae;
      }
      }
    }
   
View Full Code Here

        } catch (Exception jmse) {
            System.err.println("MQRA:XARFMC:end:XAException-Exception="+jmse.getMessage());
            //Debug.println("*=*=*=*=*=*=*=*=*=*=XAR:end:XAException");
            Debug.printStackTrace(jmse);
            XAException xae = new XAException(XAException.XAER_RMFAIL);
            xae.initCause(jmse);
            throw xae;
        }
  }

    /**
 
View Full Code Here

          clearTransactionInfo();
        } catch (JMSException jmse) {
                System.err.println("MQRA:XARFMC:forget:XAException-Exception="+jmse.getMessage());
                Debug.printStackTrace(jmse);
                XAException xae = new XAException(XAException.XAER_RMFAIL);
                xae.initCause(jmse);
                throw xae;
        }
          }
        }
    }
View Full Code Here

        } catch (Exception jmse) {
            System.err.println("MQRA:XARFMC:prepare:XAException-Exception="+jmse.getMessage());
            //Debug.println("*=*=*=*=*=*=*=*=*=*=XAR:prepareXAException");
            Debug.printStackTrace(jmse);
            XAException xae = new XAException(XAException.XAER_RMFAIL);
            xae.initCause(jmse);
            throw xae;
        }
               
        // update the resource state
        resourceState=PREPARED;
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.