Monday, April 21, 2014

How to use sling thread pool in CQ/AEM

Use Case: You are designing an application where you might need to delegate Job to a separate thread and you want to control this using thread pool so that your application it self does not run out of threads.

Prerequisite: Knowledge of Java Threads and basic Knowledge of thread pool. Note that there are Java Level thread pool as well that you can use. Check for that.


Implementation Example:

Step 1: Create your Thread class

public YourThreadClass implements Runnable {

 public void run() {
    //Your custom logic

Step 2: Main class to use sling Thread pool

Use CQ dependency finder to find what dependency you need for above code in your pom.xml


  1. Nice use case. We will promote this from with Adobe.

  2. Thanks for this great share. This site is a fantastic resource. Keep up the great work here at Sprint Connection! Many thanks.

    Southbay Pool Cleaning Services

  3. Hi Guys , Greetings for the day for AEM 6 Online training classes visist :
    call/whats app : +1-845-915-8712

  4. interesting information. This is just the kind of information that i had been looking for, i'm already your rss reader now and i would regularly watch out for the new posts,Thanks a million once again, Regardsadobe cq5 training in hyderabad

  5. Nice article thanks for the information. We also provide Adobe CQ online training. GO here if you’re looking for information on Adobe CQ Training.

  6. Really impressive post. I read it whole and going to share it with my social circules. I enjoyed your article and planning to rewrite it on my own blog.
    Packers And Movers in Bangalore

  7. There's a lot of interesting info here! I'm very grateful for the post! movers and packers hyderabad , is here to make your life simpler.
    Packers And Movers Hyderabad Packers And Movers is recognized as a business manager providing wide-ranging and differentiate service appearance as well as Relocation Shifting, Logistics and Transportation, Facilities managing, strategy & Designing services.

  8. I admire the valuable advice you make available in your expertly written content. I want to thank you for this informative read; I really appreciate sharing this great.
    Packers And Movers Jaipur

  9. This post is much helpful for us. this is really very massive value to all the readers and it will be the only reason for the post to get popular with great authority.
    Informatica Training in Chennai ECR

  10. I must be thankful for sharing your ideas.Thank you for the good writeup.its a brellint job.please visit here for more detail:
    Packers and Movers Delhi

  11. his is just the kind of information that i had been looking for. thanks a lot
    return man 2 unblocked | tank trouble unblocked 1 player

  12. Thanks a lot for providing me this opportunity to write here i feel myself very blessed.
    please visit our official website for all the useful details-
    Packers And Movers Ahmedabad

  13. I want you to thank for your time of this wonderful read!!! I definately enjoy every little bit of it.
    resorts near delhi for weekend

  14. Donkey Kong Unblocked. is a revival of the Game Boy Donkey Kong.The goal is to help Mario rescue the Princess. . In this flash game remake of the original Super Mario, you can play as either Mario or Luigi. Speed around tight turns to cross the finish line in first place in the cool racing games from Car Racing Games
    . Play Run Unblocked or Run 3 Unblocked and Run 4 Unblocked Game. You enter in a prohibited zone which is full of dangerous holes.

  15. New Year Packages 2017 near Delhi NCR. New Year 2017 is an occasion of delights. So let's celebrate it together with enjoyable and a wonderful seasoning

  16. Return Man thank you for your sharing. We feel very pleased about that. You should also try their best games with our free today to get the sense of fun that brings. Thank you!
    return man
    baixar whatsapp
    mobogenie baixar
    Happy Wheels
    Happy Wheels
    Vex 3 Game
    Potty Racers 3
    Swords And Souls