1 Reply Latest reply on Oct 25, 2007 9:09 AM by Tim Fox

    Why can't RedeliveryLimit be set to -1 (no limit) (JBoss-4.2

    Adam Ringel Newbie

      I am confused, in the code it is initialized to -1:

       * The number of times a message will be redelivered after a recover or rollback.
       * The value <code>-1</code> means there is no configured limit.
       public int redeliveryLimit =-1 ;

      However, if you try to set it to -1 via jmx, it throws an exception:
      public void setRedeliveryLimit(int limit)
       if (limit < 0)
       throw new IllegalArgumentException("Negative redelivery limit: " + limit);
       parameters.redeliveryLimit = limit;