title: Create a Job Queue or Task Controller and dynamically add task to it in Java
body: <p>Hi all I want to create a job queue to execute multiple task.but,my requirement is i should be able to add tasks to that job queue any time and all those tasks should be executed sequentially. I searched some solutions in internet and found these two links 1)<a href="http://howtodoinjava.com/best-practices/java-executor-framework-tutorial-and-best-practices/" rel="nofollow noreferrer">Java Thread Pool Executor Example</a> 2)<a href="http://howtodoinjava.com/best-practices/java-executor-framework-tutorial-and-best-practices/" rel="nofollow noreferrer">Java Executor Framework Tutorial and Best Practices</a>. But i can't use both of these solution.Because after starting Executor service I can't add new task to the service. Because we know that It may throw InterruptedException or ConcurrentModificationException.</p>