DWR

Allow users to set an alternative error handler for polling errors and to specify a retry policy

Details

  • Type: Improvement Improvement
  • Status: Resolved Resolved
  • Priority: Normal Normal
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 3.0.RC3
  • Component/s: Engine
  • Documentation Required:
    No
  • Description:
    Hide
    In 2.0 pollErrorHandler is not customizable and the retry policy is hard coded. An application may want to be notified when reverse AJAX failed and to specify the number
    of retries and delays between them (e.g. in a clustered environment, we want to retry without a delay a couple of times and then increase the delay).
    I suggest to add an additional user-level error handler, which takes a retry number (in addition to the error message) and returns the next retry delay or -1 to cancel retrying.
    For example, a handler, which implements the current retry policy:

    function(message, ex, retryNum) {
      // if anything goes wrong then just silently try again (up to 3x) after 10s
      return retryNum < 3 ? 10000 : -1;
    };
    Show
    In 2.0 pollErrorHandler is not customizable and the retry policy is hard coded. An application may want to be notified when reverse AJAX failed and to specify the number of retries and delays between them (e.g. in a clustered environment, we want to retry without a delay a couple of times and then increase the delay). I suggest to add an additional user-level error handler, which takes a retry number (in addition to the error message) and returns the next retry delay or -1 to cancel retrying. For example, a handler, which implements the current retry policy: function(message, ex, retryNum) {   // if anything goes wrong then just silently try again (up to 3x) after 10s   return retryNum < 3 ? 10000 : -1; };
  1. dwr-poll-error-handler.patch
    (4 kB)
    Ilya Perminov
    27/Apr/07 8:09 PM

Activity

Ilya Perminov made changes - 27/Apr/07 8:09 PM
Field Original Value New Value
Attachment dwr-poll-error-handler.patch [ 10020 ]
Joe Walker made changes - 02/May/07 3:43 PM
Fix Version/s 2.2 [ 10025 ]
Joe Walker made changes - 29/Feb/08 10:19 AM
Fix Version/s 3.0.M2 [ 10051 ]
Fix Version/s 3.0 [ 10025 ]
Joe Walker made changes - 14/Mar/08 4:48 PM
Status Open [ 1 ] In Progress [ 3 ]
Joe Walker made changes - 30/Oct/08 5:52 PM
Status In Progress [ 3 ] Open [ 1 ]
Joe Walker made changes - 15/Dec/08 11:17 PM
Fix Version/s 3.0.RC1 [ 10051 ]
Fix Version/s 3.0.RC2 [ 10090 ]
David Marginian made changes - 08/Apr/09 9:44 AM
Assignee Joe Walker [ joe ] Team [ team ]
David Marginian made changes - 24/Apr/09 2:06 AM
Priority Major [ 3 ] Normal [ 6 ]
David Marginian made changes - 22/May/09 4:27 AM
Fix Version/s 3.0 [ 10025 ]
Fix Version/s 3.0.RC2 [ 10090 ]
David Marginian made changes - 23/Jun/09 4:44 AM
Assignee Team [ team ] David Marginian [ davidmarginian ]
David Marginian made changes - 23/Jun/09 4:52 AM
Fix Version/s 3.0.RC2 [ 10090 ]
Fix Version/s 3.0 [ 10025 ]
Resolution Fixed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]
David Marginian made changes - 08/Aug/10 10:48 AM
Resolution Fixed [ 1 ]
Status Resolved [ 5 ] Reopened [ 4 ]
David Marginian made changes - 24/Aug/10 5:16 AM
Status Reopened [ 4 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
Documentation Required Yes
David Marginian made changes - 09/Nov/10 8:46 PM
Documentation Required Yes No
David Marginian made changes - 13/Jul/11 4:25 AM
Resolution Fixed [ 1 ]
Status Resolved [ 5 ] Reopened [ 4 ]
David Marginian made changes - 13/Jul/11 4:26 AM
Fix Version/s 3.0.RC3 [ 10120 ]
Fix Version/s 3.0.RC2 [ 10090 ]
Mike Wilson made changes - 29/Nov/12 3:51 PM
Fix Version/s 3.0.RC4 [ 10140 ]
Fix Version/s 3.0.RC3 [ 10120 ]
David Marginian made changes - 05/Dec/12 7:02 PM
Status Reopened [ 4 ] In Progress [ 3 ]
David Marginian made changes - 05/Dec/12 7:02 PM
Fix Version/s 3.0.RC3 [ 10120 ]
Fix Version/s 3.0.RC4 [ 10140 ]
David Marginian made changes - 07/Dec/12 4:24 AM
Status In Progress [ 3 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]

People

Dates

  • Created:
    27/Apr/07 8:07 PM
    Updated:
    07/Dec/12 4:24 AM
    Resolved:
    07/Dec/12 4:24 AM