| Summary: | per thread deactivation & activation fails to establish global activation | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Tools] Objectteams | Reporter: | Stephan Herrmann <stephan.herrmann> | ||||
| Component: | OTEquinox | Assignee: | Stephan Herrmann <stephan.herrmann> | ||||
| Status: | VERIFIED FIXED | QA Contact: | |||||
| Severity: | major | ||||||
| Priority: | P3 | ||||||
| Version: | 0.7 | ||||||
| Target Milestone: | 0.7.1 | ||||||
| Hardware: | PC | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Stephan Herrmann
Created attachment 176809 [details]
Proposed fixes
This is a two-part fix:
* Let TransformerHook transform all classes (directly) extending j.l.Thread
in order to weave in calls to TeamThreadManager
* For Worker threads, this comes too late, because class Worker is loaded
very early. Instead we register a JobListener, that will call the
TeamThreadManager directly, without relying on bytecode augmentation.
The original use case (type hierarchy view) works fine with this patch.
The fix works fine in real-world usage, closing. CAVEAT: the current implementation only covers subclasses of Thread, but the OTRE normally also weaves into implementors of Runnable. Yet, I'm reluctant to extend the solution because of the sheer number of Runnables (plus analysis currently only follows the superclass chain, not super interfaces). In Eclipse plugins directly invoking new Thread(runnable) is very rare. In this context it might be safe to omit runnables from weaving. However, this is not true for OSGi in general. Verified using I201009211735 |