Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-10586

Documentation - JBM -> HornetQ client migration

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Obsolete
    • Major
    • TBD EAP 5
    • EAP_EWP 5.2.0 ER6
    • Documentation, HornetQ
    • None
    • Not Required
    • NEW

    Description

      In HornetQ User Guide [1] in chapter "2.3 Client-side Failure Handling" would be better to replace:

        try {
          producer.send(createMessage(session, i));
          System.out.println("Message: " + i);
        } catch (Exception e) {
          Thread.sleep(1000);
          producer.send(createMessage(session, i));
        }
      

      By:

      int numberOfRetries = 0;
      
      while (numberOfRetries < maxRetries) {
         try {
            producer.send(msg);
            return;
         } catch (JMSException ex) {
            numberOfRetries++;
         }
      }
      // this is an error - failover was not succeed
      throw new Exception("FAILURE - MaxRetry reached");
      

      @Clebert
      Could you or anyone from the dev team review the code before we make it public, please?

      Thanks a lot,
      Mirek

      Attachments

        Activity

          People

            csuconic@redhat.com Clebert Suconic
            mnovak1@redhat.com Miroslav Novak
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: