Package javax.transaction.xa

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


        } catch (SystemException ex) {
            // remove tx
            SubordinationManager.getTransactionImporter().removeImportedTransaction(xid);

            final XAException xaException = new XAException(XAException.XAER_RMERR);
            xaException.initCause(ex);
            throw xaException;


        } finally {
            // disassociate the tx that was asssociated (resumed) on this thread.
View Full Code Here


                    }
                    // remove the transaction
                    SubordinationManager.getTransactionImporter().removeImportedTransaction(xid);
                    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 asssociated (resumed) on this thread.
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

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.