Examples of TransactionRolledbackException


Examples of javax.jms.TransactionRolledBackException

                  reconnect(consumersWithSelector);
               }

               if (!firstConnect && session.getTransacted())
               {
                  throwThis = new TransactionRolledBackException("reconnect has forced transaction rollback");
               }
            }
         }
         catch (JMSException ex)
         {
View Full Code Here

Examples of javax.jms.TransactionRolledBackException

        }
       
        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

Examples of javax.jms.TransactionRolledBackException

            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

Examples of javax.jms.TransactionRolledBackException

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

            if (e instanceof TransactionRolledBackException) {
                TransactionRolledBackException transactionRolledBackException = (TransactionRolledBackException) e;
                if (transactionRolledBackException.getMessage().indexOf("in doubt") != -1) {
                    // failover chucked bc there is a missing reply to a commit.
                    // failover is involved b/c the store exception is handled broker side and the client just
                    // sees a disconnect (socket.close()).
                    // If the client needs to be aware of the failure then it should not use IOExceptionHandler
                    // so that the exception will propagate back
View Full Code Here

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

Examples of javax.jms.TransactionRolledBackException

            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

Examples of javax.jms.TransactionRolledBackException

        }
       
        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

Examples of javax.jms.TransactionRolledBackException

            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

Examples of javax.jms.TransactionRolledBackException

            {
                _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

Examples of javax.jms.TransactionRolledBackException

        }
       
        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
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.