This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Threads and Synchronization and the fly likes ThreadpoolExecutor error Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Threads and Synchronization
Reply Bookmark "ThreadpoolExecutor error" Watch "ThreadpoolExecutor error" New topic
Author

ThreadpoolExecutor error

manisha makwana
Ranch Hand

Joined: Sep 14, 2007
Posts: 37
Hi,
here is my code.This code always give the following error

java.util.concurrent.RejectedExecutionException
at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.reject(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.execute(Unknown Source)


final ArrayBlockingQueue<Runnable> queue = new ArrayBlockingQueue(3);
ThreadPoolExecutor threadPool = new ThreadPoolExecutor(1, 3,30000, TimeUnit.SECONDS, queue);

threadPool.execute(new ResumeParserAPI(resumePath,userData,resumeServiceURL,userSession,service,attachmentURL));
Nitesh Kant
Bartender

Joined: Feb 25, 2007
Posts: 1638

If you see the javadocs for ThreadPoolExecutor, there is a section for Rejected Tasks. Can you find a reason there why your threadpool will reject tasks?


apigee, a better way to API!
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: ThreadpoolExecutor error
 
Similar Threads
restarting and stopping serversocket running on port
Producer Consumer Controller
Stopping a thread in threadPoolExecutor
How can I serialize thread handling with Java 5's java.util.concurrent package?
ThreadPoolExecutor getting stuck