Ticket #208 (closed defect: wontfix)
OTRE doesn't know about all threads
| Reported by: | stephan | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | |
| Component: | runtime-environment | Version: | pre_1.0 |
| Keywords: | topprax-jira | Cc: |
Description (last modified by stephan) (diff)
(From Jira:TPX-477)
When starting AO disposition and trying to execute the cyclic disposition workflow, an exception ist thrown (see below). Note that a change of isActive() to isActive(aThread) in Workflow.java doesn't work, too. In 0.9.13, the problem doesn't occur.
----------------------------------------------------
Exception in thread "AWT-EventQueue-0" java.lang.IllegalThreadStateException: Called 'isActive(...)' for a thread which is no longer running! at org.objectteams.Team.isActive(Team.java:245) at org.objectteams.Team.isActive(Team.java:227) at de.gebit.topprax.disposition.aop.controller.disposition.cyclic.Workflow$__OT__Controller.deactivate(Workflow.java:365) ...
Answer by resix:
The "IllegalThreadStateException" should be thrown, if you call isActive(th) for a thread 'th' which is already finished.
This is not the case in your example, but the OTRE has the problem, that it is not "aware" of all threads (threads loaded by the bootstrap classloader, the main thread, ?).
Temporary fix of this problem: instead of checking for
if (!TeamThreadManager.getExistingThreads().contains(thread)) { throw exception }the OTRE now checks for
if (!thread.isAlive()) { throw exception }but we have to develop a more general solution for the problems with overlooked threads (see also TPX-414)!
all news
RSS feed