aspose file tools
The moose likes Threads and Synchronization and the fly likes ThreadpoolExecutor error Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
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: 1629

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!
 
 
subject: ThreadpoolExecutor error
 
Threads others viewed
Stopping a thread in threadPoolExecutor
Producer Consumer Controller
ThreadPoolExecutor getting stuck
How can I serialize thread handling with Java 5's java.util.concurrent package?
restarting and stopping serversocket running on port
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture