Package javax.jms

Examples of javax.jms.TransactionRolledBackException


    }
    // Catching an exception if the sendings or acknowledgement went wrong:
    catch (JMSException jE) {
      if (logger.isLoggable(BasicLevel.ERROR))
        logger.log(BasicLevel.ERROR, "", jE);
      TransactionRolledBackException tE = new TransactionRolledBackException(
          "A JMSException was thrown during the commit.");
      tE.setLinkedException(jE);

      if (logger.isLoggable(BasicLevel.ERROR))
        logger.log(BasicLevel.ERROR, "Exception: " + tE);

      rollback();
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

        }
       
        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

            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

            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

                  reconnect(consumersWithSelector);
               }

               if (!firstConnect && session.getTransacted())
               {
                  throwThis = new TransactionRolledBackException("reconnect has forced transaction rollback");
               }
            }
         }
         catch (JMSException ex)
         {
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

            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

                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

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.