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

Bug 309786

Summary: Jobs cannot be rescheduled
Product: [RT] RAP Reporter: Niels Lippke <niels.lippke>
Component: WorkbenchAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 1.3   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Snippet to demonstrate the problem. none

Description Niels Lippke CLA 2010-04-20 06:17:41 EDT
Created attachment 165406 [details]
Snippet to demonstrate the problem.

The code below works in RCP, but not in RAP. 

The attached snippet fills a table as a result of a job execution. If the job can be scheduled only one time. If the job is scheduled anew a 
JobCanceler is notified which calls the done-Method with a Cancel Status and 
the job is not executed.

This is a User job. Apart from the snippet set 

public void preWindowOpen() {
     IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
     ...
     configurer.setShowProgressIndicator( true );
}

to see the ProgressIndicator. Notice that job.setUser(true) must be set before 
scheduling to cause the problem.
Comment 1 RĂ¼diger Herrmann CLA 2010-04-28 09:58:42 EDT
The fix for bug 283595 introduced that terminated Jobs are explicitly cancelled under certain circumstances.
Comment 2 RĂ¼diger Herrmann CLA 2010-04-28 10:47:05 EDT
The information given in comment #1 is true but has nothing to do with this bug.
The ProgressMonitorFocusJobDialog had a HttpSessionBindingListener to cancel Jobs at session shutdown. The code from its valueUnbound method was unwantedly executed even though the session was still alive. The fix is to only execute the code only when the session died.
Changes are in CVS HEAD.