river-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gregg Wonderly <gr...@cytetech.com>
Subject com.sun.jini.thread lock contention
Date Fri, 04 Jun 2010 15:00:04 GMT
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

Mime
View raw message