• Post Reply Bookmark Topic Watch Topic
  • New Topic

Why multithreading can't be done in EJBs

 
Raj Kumar Bindal
Ranch Hand
Posts: 418
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
**I think multithreading is not allowed in EJBs.
***I don't think if there will be any problem if multithreading is allowed in EJBs.
***so why multithreading is not allowed in EJBs.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The container uses configuration about the number of beans and such to control threads and other thread-based resources. If you create threads that it doesn't know about, resource usage can get out of balance in a hurry. I think it only becomes a serious problem if the threads you create use container services like calling other beans, transactions, etc. I've broken the rules a time or two with very tightly controlled code but I think it may be in future plans for some containers to detect and prevent violations like mine.
[ May 22, 2006: Message edited by: Stan James ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!