Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor vs org.springframework.scheduling.c  RSS feed

 
Tony Evans
Ranch Hand
Posts: 598
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am building callable threads currently I have in my config



This creates a pool of 10 threads or callables.

In spring we can have



This allows us to set max size of the pool and the size of the queue. I was wondereing is it possible to do this with java.util.concurrent.Executors rather than having to implement spring scheduling.

Thanks for any help.
 
Campbell Ritchie
Sheriff
Posts: 53740
127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you mean Callable the interface with callable the common‑or‑garden word?
I am pretty sure you can build a ten‑thread pool using executors to create a cached thread pool but can&aps;t remember how to do it.
 
Tony Evans
Ranch Hand
Posts: 598
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
More than one way to skin a cat






 
Tony Evans
Ranch Hand
Posts: 598
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My original question was to set core pool, max pool queue capacity go the spring route,ThreadPoolTaskExecutor vs ThreadPoolExecutor, if you dont mind using Sping I guess go for ThreadPoolTaskExecutor
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!