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=8970>. 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=8970 ResourceLimitingPool doesn't respect maximum pool size Summary: ResourceLimitingPool doesn't respect maximum pool size Product: Avalon Version: unspecified Platform: Sun OS/Version: Solaris Status: NEW Severity: Major Priority: Other Component: Excalibur AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Our application uses an org.apache.avalon.excalibur.thread.impl.ResourceLimitingThreadPool; we use the single-arg constructor (max pool size). There is only one instance of RLTP in our application. After running a while (a network management application that opens a large number of TCP/UDP sockets) we find that the number of WorkerThreads in the thread stack exceeds the set maximum; the number seems to increase slowly with time. We tried with a maximum of 25 and with a maximum of 5 and observed the same behavior. Here is a code snippet showing our use of the thread pool. MonitorWorker is a Runnable. The threadPool variable is ResourceLimitingThreadPool. The workerPool is a simple pool of MonitorWorker objects (based on ideas from Doug Lea's Concurrent Programming in Java, 2nd Ed.) for( int i = 0; i < monitors.length; i++ ) { MonitorWorker nextWorker = null; try { Thread.sleep(sleepTime); synchronized( this.monitors ) { if( i < this.monitors.length ) { nextWorker = this.workerPool.getWorker(); nextWorker.resetMonitor(this.monitors[i]); } else break; } this.threadPool.execute(nextWorker); } catch (InterruptedException ie) { this.logger.debug("Execution interrupted"); } } The tested system is a Sun SPARC Ultra 60 running Solaris 5.8. Java VM is Java 1.2.2 46.0(Sun Microsystems Inc.) We're using a minimum heap size of 32M, max of 132m. If you need any more information I'll be happy to help! -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>