You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by bu...@apache.org on 2002/12/12 00:21:39 UTC
DO NOT REPLY [Bug 15296] New: -
ThreadPool limits are incorrectly handled
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15296>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15296
ThreadPool limits are incorrectly handled
Summary: ThreadPool limits are incorrectly handled
Product: Avalon
Version: unspecified
Platform: All
URL:
http://nagoya.apache.org/eyebrowse/ReadMsg?listName=aval
on-dev@jakarta.apache.org&msgNo=16341
OS/Version: All
Status: NEW
Severity: Normal
Priority: Other
Component: Cornerstone
AssignedTo: avalon-apps-dev@jakarta.apache.org
ReportedBy: noel@devtech.com
The explanation of the problem, and one way to fix, is archived in:
http://nagoya.apache.org/eyebrowse/ReadMsg?listName=avalon-
dev@jakarta.apache.org&msgNo=16341
I don't have the source for the Avalon modules checked out to provide you with
a formal patch, but it should not take more than a few minutes for an Avalon
developer to apply the two changes, if these are the way you want to fix the
defect (doesn't change processing; it just preserves the proper min and max
values).
In org.apache.avalon.excalibur.thread.impl.DefaultThreadPool add:
public DefaultThreadPool( final String name,
final int min, final int max,
final ThreadContext context )
throws Exception
{
super( name );
m_underlyingPool = new SoftResourceLimitingPool( this, min, max );
m_pool = new BasicThreadPool( this, name, m_underlyingPool, context );
}
Then in org.apache.avalon.cornerstone.blocks.threads.DefaultThreadManager,
change the configureThreadPool method from using:
DefaultThreadPool threadPool = new DefaultThreadPool(name,
maxThreads,
threadContext);
to using:
DefaultThreadPool threadPool = new DefaultThreadPool(name,
minThreads,
maxThreads,
threadContext);
That will require Cornerstone and Excalibur to be in-synch, since Cornerstone
will require the new constructor.
Peter Donald replied to the archived message with his approval for this as the
change.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>