1 2 Previous Next 17 Replies Latest reply on May 15, 2012 12:04 PM by jomu78 Go to original post
      • 15. Re: Message order after MDB rollback
        jomu78

        if we don't, we have "message rolled back" every second (or even faster) in the logfile - and if we reach the recipient there can be log entries also which are written several (undred) times per minute. big logfiles, unreadable logfiles, no disk space left, .. that is the difference

        • 16. Re: Message order after MDB rollback
          ataylor

          oh, i thought you were saying you had to do it because of some bug, why not do this so you only log an error once

           

          @Override
          public void onMessage(Message msg) {
            try {
              TextMessage textMessage = (TextMessage) msg;
              String text = textMessage.getText();
              if (testFile.exists()) {
                ejbContext.setRollbackOnly();

                if(!logged) {
                     logger.log(Level.INFO, "Rolled back message {0}", text);

                     logged = true;    

                }
              } else {

                logged = false;  
                logger.log(Level.INFO, "Message delivered   {0}", text);
              }
            } catch (JMSException ex) {
              logger.log(Level.SEVERE, "Exception occured: {0}", ex);
            }
          }

          • 17. Re: Message order after MDB rollback
            jomu78

            something like that could work on our side, but instead of logging the message we transfer the data to another server - and this logging we cannot change. Anyway - we have at least a workaround.

            1 2 Previous Next