Package javax.transaction.xa

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


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

    public void rollback() throws XAException, IOException {
View Full Code Here


            fireAfterRollback();
        } catch (Throwable e) {
            LOG.warn("POST ROLLBACK FAILED: ", e);
            XAException xae = new XAException("POST ROLLBACK FAILED");
            xae.errorCode = XAException.XAER_RMERR;
            xae.initCause(e);
            throw xae;
        }
    }

    public int prepare() throws XAException {
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

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

    /**
 
View Full Code Here

            if (heuristicCommit) {
                e = new XAException(XAException.XA_HEURMIX);
            } else {
                e = new XAException(XAException.XA_HEURRB);
            }
            e.initCause(txe);
            throw e;
        }
    }

    /**
 
View Full Code Here

                    " and onePhase:" + onePhase +
                    //"and Xid:" + mqxid.toString() +
                    " due to " + failure_cause;
             _loggerOC.severe(exerrmsg);
             XAException xae = new XAException(XAException.XAER_RMERR);
             xae.initCause(jse);
             throw xae;
         } finally {
           // finish up this resource and any others joined to it in this transaction
           boolean throwExceptionIfNotFound = false;
           XidImpl savedXid = this.mXid;
View Full Code Here

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

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

                    " failed for connectionId:"+ connectionId +
                    //"and Xid:" + mqxid.toString() +
                    " due to " + failure_cause;
            _loggerOC.severe(exerrmsg);
            XAException xae = new XAException(XAException.XAER_RMERR);
            xae.initCause(jse);
            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.