Bug 289182 - [Jobs] Document need to cancel/job jobs during bundle shutdown
Summary: [Jobs] Document need to cancel/job jobs during bundle shutdown
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Runtime (show other bugs)
Version: 3.4.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.6 RC4   Edit
Assignee: John Arthorne CLA
QA Contact:
URL:
Whiteboard:
Keywords: Documentation
Depends on:
Blocks:
 
Reported: 2009-09-11 05:24 EDT by Krzysztof Daniel CLA
Modified: 2010-06-02 21:43 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Krzysztof Daniel CLA 2009-09-11 05:24:11 EDT
see bug 47255 comment 27

"Please be aware that if your bundle starts any threads 
but does not ensure the threads are stopped when your bundle is stopped then 
you may run into issues when your bundle is updated or uninstalled since we 
still close classloaders in these cases."

On the other hand javadoc for JobManager.shutdown says:

"Shuts down the job manager.  Currently running jobs will be told
o stop, but worker threads may still continue processing."

In other words, classloader can be shutdown while jobs threads are still active.
Comment 1 John Arthorne CLA 2009-09-11 10:47:59 EDT
This is all true, but I'm not sure what your point is... Just like with threads, clients need to make sure they finish their jobs before their bundle stops, otherwise *they* are running their own code after their class loader has gone away. Anything we do during shutdown of the jobs bundle is too late, because client bundles will be shutdown much before that point and will already be vulnerable to this problem.
Comment 2 Krzysztof Daniel CLA 2009-10-21 06:59:00 EDT
I believe that information needs to be placed somewhere (help?) just for education purposes. Discovering what's wrong is not a trivial task, espacially that logging is at that point shut down.
Comment 3 John Arthorne CLA 2010-06-02 21:43:59 EDT
Added to runtime_jobs.htm in the platform plugin developers guide.