• Post Reply Bookmark Topic Watch Topic
  • New Topic

java.util.concurrent.ThreadPoolExecutor in JBOSS server

 
Cindy Jones
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a webservice deployed on the JBOSS application server. Is it ok to spawn threads from within the service using ThreadPoolExecutor and FutureTask?
I read that it is bad to do J2EE and Threads together.
What are my alternatives if I need to execute multiple resource intensive tasks parallely and wait for the results.

Thanks!
 
Alan Mehio
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cindy Jones wrote:I have a webservice deployed on the JBOSS application server. Is it ok to spawn threads from within the service using ThreadPoolExecutor and FutureTask?
I read that it is bad to do J2EE and Threads together.
What are my alternatives if I need to execute multiple resource intensive tasks parallely and wait for the results.

Thanks!


It depends on the siutation. If you have a business class which does intensive processing on the sever side so what is wrong with using threadExecutor to execute the tasks on the thread pool? Can you give us a link to the article which you have read


 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!