Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 353074

Summary: Clarify IJobChangeListener contract regarding error handling and threading
Product: [Eclipse Project] Platform Reporter: Gunnar Wagenknecht <gunnar>
Component: RuntimeAssignee: platform-runtime-inbox <platform-runtime-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: john.arthorne
Version: 3.7   
Target Milestone: ---   
Hardware: All   
OS: Windows 7   
Whiteboard: stalebug

Description Gunnar Wagenknecht CLA 2011-07-26 02:35:41 EDT
It would be nice if IJobChangeListener can have more clarifying words regarding error handling and threading.

What happens if any of the IJobChangeListener throw a RuntimeException? 
- Will the listener get removed or will it continue to receive notifications? 
- Will the job still be executed or will it be aborted?

How are IJobChangeListener methods called?
- Inside or outside the same thread the calls Job#run?

The last topic is especially of interest for me. I'd like to implement a IJobChangeListener that in #running(IJobChangeEvent) sets some ThreadLocal and unsets it in #done(IJobChangeEvent event) (for example, Logback logging MDC). This works nicely currently. But it's not explicitly stated in the contract of IJobChangeListener if it works by accident of if my implementation can rely on the behavior.
Comment 1 Lars Vogel CLA 2019-11-14 03:18:47 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

If the bug is still relevant, please remove the "stalebug" whiteboard tag.