How to monitor queue size of a thread pool

Michal Singer <[email protected]> Mon, 1 Feb 2010 01:01:35 -0800 (PST)
Newsgroups gmane.comp.java.springframework.user
Message-ID <[email protected]>
hi. i am trying to check out during runtime, the queue of waiting tasks of a
thread pool.
I am using org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor
and calling this:

ThreadPoolTaskExecutor.getThreadPoolExecutor().getQueue().size()

But it returns the pool size and not the queue size  (which should be
different where pool size is the threads which are available to run and
queue size is the tasks waiting to be executed in those threads)

Anybody knows how to extarct this information?

Thanks, Michal
-- 
View this message in context: http://old.nabble.com/How-to-monitor-queue-size-of-a-thread-pool-tp27401289p27401289.html
Sent from the springframework-user mailing list archive at Nabble.com.


------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com