The TaskManager class has a subclass of Thread that it uses to run tasks. The
problem with subclassing Thread, is that there is a lock that is used in Thread
to see if some methods are overridden so that security can be maintained. So,
in an environment where Thread is used with a SecurityManager, it is better to
use a Runnable to encapsulate the custom code, instead of a Thread.
The TaskThread class should be a Runnable instead of a Thread, and then there
are just 3 other places where it is referenced that need some adjustment. The
thread that is running inside of the runnable needs to be put into a per
instance variable for one place where interrupt processing is handled.
Gregg Wonderly
- com.sun.jini.thread lock contention Gregg Wonderly
-