Monday, 9 June 2014

RepeatingRequestMonitor

It is used to track request threads that register themselves as executing by name and for a designated time period, to ensure that the same request handler is not executed by two request scoped components concurrently (as happens when a user clicks a submit button multiple times).  
Form handlers should use this by calling the RepeatingRequestMonitor.isUniqueRequestEntry() method. The boolean return value indicates whether the handler is free to proceed execution, or whether another request scoped component has recently been executing the same method for this session.  
The handler may specify a timeout duration for this entry, or use the configurable default timeout. After the critical execution, the handler may remove the request entry or have these otherwise expire after the timeout.

Example:-



No comments:

Post a Comment