Package javax.transaction.xa

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


    private void throwNewXAException(Exception E)
        throws XAException {

        XAException ret = new XAException(E.toString());
        ret.initCause(E);
        throw ret;
    }
}
View Full Code Here


         {
            XAException xae = new XAException("Connection unavailable for xa recovery");
            xae.errorCode = XAException.XA_RETRY;
            if (error != null)
            {
               xae.initCause(error);
            }
            if (HornetQJMSServerLogger.LOGGER.isDebugEnabled())
            {
               HornetQJMSServerLogger.LOGGER.debug("Cannot get connectionFactory XAResource", xae);
            }
View Full Code Here

         {
            XAException xae = new XAException("Error trying to connect to any providers for xa recovery");
            xae.errorCode = XAException.XAER_RMERR;
            if (error != null)
            {
               xae.initCause(error);
            }
            if (HornetQJMSServerLogger.LOGGER.isDebugEnabled())
            {
               HornetQJMSServerLogger.LOGGER.debug("Cannot get connectionFactory XAResource", xae);
            }
View Full Code Here

                    }
                    // remove the transaction
                    SubordinationManager.getTransactionImporter().removeImportedTransaction(this.xidTransactionID.getXid());
                    final XAException xaException = new XAException(xaExceptionCode);
                    if (initCause != null) {
                        xaException.initCause(initCause);
                    }
                    throw xaException;

                case TwoPhaseOutcome.INVALID_TRANSACTION:
                    throw new XAException(XAException.XAER_NOTA);
View Full Code Here

            }
            throw ex;

        } catch (final HeuristicRollbackException ex) {
            XAException xaException = new XAException(XAException.XA_HEURRB);
            xaException.initCause(ex);
            throw xaException;

        } catch (HeuristicCommitException ex) {
            XAException xaException = new XAException(XAException.XA_HEURCOM);
            xaException.initCause(ex);
View Full Code Here

            xaException.initCause(ex);
            throw xaException;

        } catch (HeuristicCommitException ex) {
            XAException xaException = new XAException(XAException.XA_HEURCOM);
            xaException.initCause(ex);
            throw xaException;

        } catch (HeuristicMixedException ex) {
            XAException xaException = new XAException(XAException.XA_HEURMIX);
            xaException.initCause(ex);
View Full Code Here

            xaException.initCause(ex);
            throw xaException;

        } catch (HeuristicMixedException ex) {
            XAException xaException = new XAException(XAException.XA_HEURMIX);
            xaException.initCause(ex);
            throw xaException;

        } catch (final IllegalStateException ex) {
            // remove the imported tx
            SubordinationManager.getTransactionImporter().removeImportedTransaction(xid);
View Full Code Here

        } catch (final IllegalStateException ex) {
            // remove the imported tx
            SubordinationManager.getTransactionImporter().removeImportedTransaction(xid);

            XAException xaException = new XAException(XAException.XAER_NOTA);
            xaException.initCause(ex);
            throw xaException;

        } catch (SystemException ex) {
            // remove the imported tx
            SubordinationManager.getTransactionImporter().removeImportedTransaction(xid);
View Full Code Here

            // invoke forget
            subordinateTransaction.doForget();

        } catch (Exception ex) {
            final XAException xaException = new XAException(XAException.XAER_RMERR);
            xaException.initCause(ex);
            throw xaException;

        } finally {
            SubordinationManager.getTransactionImporter().removeImportedTransaction(xid);
            // disassociate the tx that was associated (resumed) on this thread.
View Full Code Here

        } catch (RollbackException e) {
            // remove the tx
            SubordinationManager.getTransactionImporter().removeImportedTransaction(xid);
            final XAException xaException = new XAException(XAException.XA_RBROLLBACK);
            xaException.initCause(e);
            throw xaException;

        } catch (XAException ex) {
            // resource hasn't had a chance to recover yet
            if (ex.errorCode != XAException.XA_RETRY) {
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.