JPPF Issue Tracker
star_faded.png
Please log in to bookmark issues
feature_request_small.png
CLOSED  Feature request JPPF-109  -  Pluggable error handler for NodeLifeCycleListener
Posted Dec 25, 2012 - updated Dec 29, 2012
action_vote_minus_faded.png
0
Votes
action_vote_plus_faded.png
icon_info.png This issue has been closed with status "Closed" and resolution "RESOLVED".
Issue details
  • Type of issue
    Feature request
  • Status
     
    Closed
  • Assigned to
     lolo4j
  • Progress
       
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
  • Posted by
     lolo4j
  • Owned by
    Not owned by anyone
  • Category
    Node
  • Resolution
    RESOLVED
  • Priority
    Normal
  • Targetted for
    icon_milestones.png JPPF 3.3
Issue description
The idea is to provide the ability for developers to implement their own error handling mechanism for uncaught throwables raised during the execution of the methods of NodeLifeCycleListener implementations.

I propose to add a new interface NodeLifeCycleErrorHandler whcih can be optionally implemented by a NodeLifeCycleListener:
public interface NodeLifeCycleErrorHandler {
  void handleError(NodeLifeCycleLEvent event, Throwable t);
}
I also propose to add an Enum of the possible event types, along with a new corresponding attribute for NodeLifeCycleLEvent, so the error handler will know which notification was invoked when the error was raised:
public class NodeLifeCycleEvent extends EventObject {
  // ...
  public NodeLifeCycleLEventType getEventType() {
    ...
  }
}
When NodeLifeCycleErrorHandler is not implemented, the behavior will default to:
  • Uncchecked exception will be caught and logged
  • Errors will be propagated up the call stack

#3
Comment posted by
 lolo4j
Dec 29, 09:11
Implemented in trunk revision 2586

The issue was updated with the following change(s):
  • The assignee has been changed to lolo4j.
  • This issue has been closed
  • The status has been updated, from New to Closed.
  • This issue's progression has been updated to 100 percent completed.
  • The resolution has been updated, from Not determined to RESOLVED.