Package javax.jms

Examples of javax.jms.TransactionRolledBackException


        final AtomicInteger rollbackCountB = new AtomicInteger(0);
        underTest.addSynchronization(new Synchronization() {
            @Override
            public void beforeEnd() throws Exception {
                if (beforeEndCountA.getAndIncrement() == 0) {
                    throw new TransactionRolledBackException("force rollback");
                }
            }

            @Override
            public void afterCommit() throws Exception {
View Full Code Here


            if (numberNotReplayed > 0) {
                String message = "rolling back transaction ("
                    + previouslyDeliveredMessages.transactionId + ") post failover recovery. " + numberNotReplayed
                    + " previously delivered message(s) not replayed to consumer: " + this.getConsumerId();
                LOG.warn(message);
                throw new TransactionRolledBackException(message);
            }
        }
    }
View Full Code Here

        }
       
        for (TransactionInfo command: toRollback) {
            // respond to the outstanding commit
            ExceptionResponse response = new ExceptionResponse();
            response.setException(new TransactionRolledBackException("Transaction completion in doubt due to failover. Forcing rollback of " + command.getTransactionId()));
            response.setCorrelationId(command.getCommandId());
            transport.getTransportListener().onCommand(response);
        }
    }
View Full Code Here

            try {
                receiveSession.rollback();
            } catch (JMSException ignored) {}

            if (e.getCause() instanceof TransactionRolledBackException) {
                TransactionRolledBackException transactionRolledBackException = (TransactionRolledBackException)e.getCause();
                if (transactionRolledBackException.getMessage().indexOf("in doubt") != -1) {
                    // failover chucked bc there is a missing reply to a commit. the ack may have got there and the reply
                    // was lost or the ack may be lost.
                    // so we may not get a resend.
                    //
                    // REVISIT: A JDBC store IO exception should not cause the connection to drop, so it needs to be wrapped
View Full Code Here

            {
                _logger.debug("Session " + _channelId + " was dirty whilst failing over. Rolling back.");
            }
            rollback();

            throw new TransactionRolledBackException("Connection failover has occured with uncommitted transaction activity." +
                                                     "The session transaction was rolled back.");
        }

        try
        {
View Full Code Here

        }
       
        for (TransactionInfo command: toRollback) {
            // respond to the outstanding commit
            ExceptionResponse response = new ExceptionResponse();
            response.setException(new TransactionRolledBackException("Transaction completion in doubt due to failover. Forcing rollback of " + command.getTransactionId()));
            response.setCorrelationId(command.getCommandId());
            transport.getTransportListener().onCommand(response);
        }
    }
View Full Code Here

        // delisting
        try {
            TransactionContextHelper.delistFromCurrentTransaction(this);
        }
        catch (BitronixRollbackSystemException ex) {
            throw (JMSException) new TransactionRolledBackException("unilateral rollback of " + this).initCause(ex);
        }
        catch (SystemException ex) {
            throw (JMSException) new JMSException("error delisting " + this).initCause(ex);
        }
        finally {
View Full Code Here

            if (numberNotReplayed > 0) {
                String message = "rolling back transaction ("
                    + previouslyDeliveredMessages.transactionId + ") post failover recovery. " + numberNotReplayed
                    + " previously delivered message(s) not replayed to consumer: " + this.getConsumerId();
                LOG.warn(message);
                throw new TransactionRolledBackException(message);
            }
        }
    }
View Full Code Here

            //Check that we are clean to commit.
            if (_failedOverDirty)
            {
                rollback();

                throw new TransactionRolledBackException("Connection failover has occured since last send. " +
                                                         "Forced rollback");
            }


            // Acknowledge all delivered messages
View Full Code Here

            if (numberNotReplayed > 0) {
                String message = "rolling back transaction ("
                    + previouslyDeliveredMessages.transactionId + ") post failover recovery. " + numberNotReplayed
                    + " previously delivered message(s) not replayed to consumer: " + this.getConsumerId();
                LOG.warn(message);
                throw new TransactionRolledBackException(message);  
            }
        }
    }
View Full Code Here

TOP

Related Classes of javax.jms.TransactionRolledBackException

Copyright © 2018 www.massapicom. 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.