Package javax.transaction.xa

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


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

View Full Code Here


        } catch (Exception jmse) {
            System.err.println("MQRA:XARFMC:rollback:XAException-Exception="+jmse.getMessage());
            //Debug.println("*=*=*=*=*=*=*=*=*=*=XAR:rollbackXAException");
            Debug.printStackTrace(jmse);
            XAException xae = new XAException(XAException.XAER_RMFAIL);
            xae.initCause(jmse);
            throw xae;
        } finally {
          if ( sa != null ) {
            xas = sa.getXASession();
            if (xas != null) {
View Full Code Here

          xari.clearTransactionInfo();
        } catch (JMSException jmse) {
                System.err.println("MQRA:XARFMC:rollback: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

              }
          } catch (Exception jmse) {
              System.err.println("MQRA:XARFMC:start:XAException-Exception="+jmse.getMessage());
              Debug.printStackTrace(jmse);
              XAException xae = new XAException(XAException.XAER_RMFAIL);
              xae.initCause(jmse);
              throw xae;
          }
   
          XAResourceMapForRAMC.register(jmqXid, this, isJoin(flags));
       
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

        } catch (Throwable t) {
            LOG.warn("Store COMMIT FAILED: ", t);
            rollback();
            XAException xae = new XAException("STORE COMMIT FAILED: Transaction rolled back.");
            xae.errorCode = XAException.XA_RBOTHER;
            xae.initCause(t);
            throw xae;
        }
    }

    private void illegalStateTransition(String callName) throws XAException {
View Full Code Here

        } catch (Throwable e) {
            LOG.warn("PRE-PREPARE FAILED: ", e);
            rollback();
            XAException xae = new XAException("PRE-PREPARE FAILED: Transaction rolled back.");
            xae.errorCode = XAException.XA_RBOTHER;
            xae.initCause(e);
            throw xae;
        }
    }

    @Override
View Full Code Here

            // I guess this could happen. Post commit task failed
            // to execute properly.
            LOG.warn("POST ROLLBACK FAILED: ", e);
            XAException xae = new XAException("POST ROLLBACK FAILED");
            xae.errorCode = XAException.XAER_RMERR;
            xae.initCause(e);
            throw xae;
        }
    }

    @Override
View Full Code Here

                prepared = true;
            }
            return result;
        } catch (SQLException e) {
            XAException xa = new XAException(XAException.XAER_RMERR);
            xa.initCause(e);
            throw xa;
        } finally {
            JdbcUtils.closeSilently(stat);
        }
    }
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.